我必须错过一些设置或其他东西,但是当我使用后退按钮时,datepicker从当前年份跳到1899.
还有其他人看过这个并修好了吗?
(你可以看到我注释掉的不同组合.)
$('.dialog-search,#from')
.datepicker({
defaultDate: 'c-1m',
dateFormat: 'yymmdd',
//changeMonth: true,
changeYear: true,
showAnim: 'fadeIn',
duration: 200,
//gotoCurrent: true,
showOtherMonths: true,
selectOtherMonths: true,
currentText: 'Now',
shortYearCutoff: '+20',
//showWeek: true,
//firstDay: 1,
numberOfMonths: 1,
showButtonPanel: true,
yearRange: 'c-200:c',
onSelect: function(selectedDate,inst) {
$('.dialog-search,#from').val(selectedDate);
}
});
Run Code Online (Sandbox Code Playgroud)