jQuery UI - Datepicker - Hide year

后端 未结 5 1042
庸人自扰
庸人自扰 2021-01-02 01:14

I\'m using jQuery UI 1.8 and I would like to hide the year from the user in both the popup and the textbox. Essentially instead of picking the day, month and year I want the

5条回答
  •  攒了一身酷
    2021-01-02 01:36

    Very old question, but I just needed to do this myself and here's an alternate method that might be useful to somebody; a quick and dirty fix that will enable your other datepickers to continue working, provided you do NOT need the changeYear functionality is to set changeYear to true on the datepickers you DON'T want a year showing up, then add the CSS:

    select.ui-datepicker-year { display:none }
    

提交回复
热议问题