Jquery datepicker years change

后端 未结 5 2139
小蘑菇
小蘑菇 2021-02-11 22:57

I am using datepicker of jquery for a field to set date of birth, while default picker is displayed which gives option to scroll to date monthly and sounds tedious. Is there a w

5条回答
  •  没有蜡笔的小新
    2021-02-11 23:36

    There's a changeYear property on the datepicker that you can set to true.

    $( ".selector" ).datepicker({ changeYear: true });
    

    http://jqueryui.com/datepicker/#dropdown-month-year

    This will render a select list from which you can choose the year you'd like.

提交回复
热议问题