【发布时间】:2013-05-22 17:44:16
【问题描述】:
无法让 jQueryUI 日期选择器选项 beforeShowDay 工作。
我尝试了找到的不同帮助主题,但无法正常工作。
我收到此错误
未捕获的类型错误:无法读取未定义的属性“0”
这是我的 JS。但它似乎不起作用
<script type="text/javascript">
jQuery(document).ready(function () {
var your_dates = [new Date(13, 5, 5), new Date(13, 5, 10)];
jQuery("div#event-calender").datepicker({
beforeShowDay: function (date) {
if (jQuery.inArray(date.toString(), your_dates) != -1) {
return [true, 'highlight'];
}
}
});
});
</script>
【问题讨论】:
标签: jquery jquery-ui jquery-ui-datepicker