一个简单的问题,但我似乎找不到答案。
我限制了 jQuery Datepicker 中的日期范围:
$( "#MyDatepicker" ).datepicker( "option", "minDate", new Date())
有没有办法取消日期范围的所有限制?
最佳答案
试试这个 $( "#MyDatepicker").datepicker( "option", "minDate", null)
。
来自有关日期选择器 minDate 选项的 JQuery 文档
Set a minimum selectable date via a Date object or as a string in the current dateFormat, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '-1y -1m'), or null for no limit.
关于jquery-ui-datepicker - 删除 jQuery UI Datepicker 中的 minDate/maxDate 限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12726042/