0
jquery-easyui datebox(http://www.jeasyui.com/documentation/index.php)和Datejs api(http://www.datejs.com/)之间存在冲突。 jquery-easyui版本是1.3.3。JQuery easyui和Datejs日期冲突
当两者都包含在任何jsp页面中时,加强日历的当前日期总是为1970年1月。我找不到任何将datebox的值设置为当前日期的方法(不想使用字符串默认值,但是而应该自动设置当前日期)。我试着用下面的代码在文档
//get the calendar object
var c = $('#dtbDueFrom').datebox('calendar');
// set the first day of week to monday
c.calendar({
current: new Date()
});
}
解释,但它引发异常TypeError: $.data(...) is undefined
。
$('#dtbDueFrom').datebox({current: new Date()});
这也行不通。
Datejs是一个非常有用的库,我不能从项目中删除它,因为我需要它提供的方法。消除它的工作绝对好,但有没有任何解决方法让两者合作。谢谢。
注意[Datejs被放弃(解决方法HTTP:/ /stackoverflow.com/tags/datejs/info)。 –