I\'ve searched here in SO and all around but no properly solutions founded for this issue. With jQueryUI DatePicker I need to select a recursive date for all years, so I do
I know it's a pretty old quesion, but maybe it will be helpful for someone. If you set the option changeYear: false
you can see a with an year value, but if you set
changeYear: true
you can see a . We can use this difference like this:
$(function() {
$("#year-datepicker").datepicker({
changeMonth: true,
changeYear: true
});
$("#no-year-datepicker").datepicker({
dateFormat: "MM d",
changeMonth: true,
changeYear: false
});
});
span.ui-datepicker-year {
display: none;
}
With year:
Without year: