【发布时间】:2023-05-04 18:31:01
【问题描述】:
我一定是错过了一些设置或什么,但是当我使用后退按钮时,日期选择器会从当前年份跳转到 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);
}
});
【问题讨论】:
-
我完全复制了所有这些,无法复制。
标签: jquery jquery-ui jquery-ui-datepicker