How can i set Year range for a jQuery Date Picker: 1900 to current year, or 1900 to 9999

后端 未结 6 2039
囚心锁ツ
囚心锁ツ 2021-02-05 10:59

Hi all i used the Jquery Date picker which works well enough for me. But i am having a small issue i.e i would like to set the Start year from 19

6条回答
  •  终归单人心
    2021-02-05 11:43

    you can set specific year of difference from current year

        $( "#datepicker" ).datepicker({ 
            changeYear: true,
             minDate: '-116Y',
             maxDate: '1Y', 
             yearRange: '-116',
         });
    

提交回复
热议问题