jQuery datepicker years shown

后端 未结 8 1296
一向
一向 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 01:54

    what no one else has put is that you can also set hard-coded date ranges:

    for example:

    yearRange: "1901:2012"
    

    whilst it may be advisable to not do this, it is however, an option that is perfectly valid (and useful if you are legitimately looking for say a specific year in a catalogue - such as "1963:1984" ).

提交回复
热议问题