Datepicker with no selected date?
Possible Duplicate:
JQuery Datepicker - no default date
When no default date is given to datepicker, when opened, it highlights today as if it was selected. Is it possible to open datepicker without any date preselected?
You can't remove the defaultDate
selected, as it will always select something (if you leave it null, it will select today). However, functionality wise, it doesn't really make a difference, so one way to go around it is to just remove the selection classes from the date like this:
$( "#datepicker" ).datepicker({
beforeShow: function(input, inst) {
window.setTimeout(function(){
$(inst.dpDiv).find('.ui-state-highlight.ui-state-hover').removeClass('ui-state-highlight ui-state-hover')
},0)
},
});
example: http://jsfiddle.net/niklasvh/zhVgm/
链接地址: http://www.djcxy.com/p/53118.html上一篇: allauth 404错误?
下一篇: 没有选定日期的日期选择器?