小编prl*_*prl的帖子

jquery ui datepicker后退按钮跃升至1899年

我必须错过一些设置或其他东西,但是当我使用后退按钮时,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)

jquery jquery-ui jquery-ui-datepicker

7
推荐指数
3
解决办法
6273
查看次数

标签 统计

jquery ×1

jquery-ui ×1

jquery-ui-datepicker ×1