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 user to just pick the day and month.
Hiding the year in the textbox is easy enough, the code shown below will do that. I’m stumped on how to hide the year from the popup – so it would say “April” instead of “April 2010”.
$(function() {
$("#beginDateRange").datepicker({ dateFormat: 'mm/dd' });
});
<input type="text" name="beginDateRange" id="beginDateRange" />
Any help would be greatly appreciated.
I dont think this option is exposed va the api.
I belive that the easiest way is to change the stylesheet.
Change the
ui-datepicker-yearclass todisplay: noneAnother option would be to edit the source so it isnt rendered at all,
to do that you can remove this part of the code:
I haven’t tried removing the code but it should work.
I did try hiding it using css and that does work (in firefox anyway 🙂 )
HTH