jQuery datepicker years shown

后端 未结 8 1310
一向
一向 2020-12-13 01:51

With the jQuery datepicker, how does one change the year range that is displayed? On the jQuery UI site it says the default is \"10 years before and after the current year

8条回答
  •  醉话见心
    2020-12-13 02:13

    i think this may work as well

    $(function () {
        $(".DatepickerInputdob").datepicker({
            dateFormat: "d M yy",
            changeMonth: true,
            changeYear: true,
            yearRange: '1900:+0',
            defaultDate: '01 JAN 1900'
        });
    

提交回复
热议问题