beforeShowDay上的jquery ui datepicker错误 [英] jquery ui datepicker error on beforeShowDay
问题描述
我正在尝试使用jquery-ui的datepicker实现事件日历。我已成功安装了datepicker,它显示并正常工作。当我尝试注册 beforeShowDay
处理程序时出现问题。像这样:
I'm trying to implement a event calendar using jquery-ui's datepicker. I've successfully installed the datepicker and it shows up and working. the problem appears when I try to register the beforeShowDay
handler. Like this:
$('#datePicker').datepicker({ beforeShowDay : function(){ }} );
我在jquery-ui -file中收到以下错误: ba is undefined
。
当我在函数中输出内容时,前四次输出但后来我收到错误。
I receive the following error in jquery-ui -file: ba is undefined
.
when I output something int the function, the first four times it outputs but then I receive the error.
$('#datePicker').datepicker({ beforeShowDay : function(){ console.log('test') }} );
输出:
// test
// test
// test
// test
// ba is undefined
如果有人知道问题是什么,请帮忙。
if anyone has a clue what's the problem, please help.
推荐答案
你必须添加这个返回[true,'']
喜欢这个
$('#datePicker').datepicker({
beforeShowDay: function(date) {
console.log('test');
return [true,''];
}
});
参考。
http://osdir.com/ml/jquery-ui /2009-02/msg00349.html
这篇关于beforeShowDay上的jquery ui datepicker错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!