Search code examples
jqueryjquery-uidatepickerjquery-ui-datepicker

Jquery datepicker - only day and month


I want the user to specify their birthday or anniversary date (without year) in a form. For this, I want to use jquery datepicker but it should not show any year option at all. How to do it?

I tried modifying the code in this so question by making changeDay: true and changeYear: false but could not get it to work.


Solution

  • set the css to hide the year and the dateFormat as K6t said

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