BadHorsie BadHorsie - 1 year ago 156
jQuery Question

jQuery Datepicker - Show full month names in select box

It's really bugging me that the jQuery datepicker has a select box for changing the month but it doesn't show the full month name (but it does in the other months).


Is there a way to customise the datepicker to show the full month name without modifying the source code?

Answer Source

Maybe a little bit late but I was having the same problem at this moment and it was pretty easily fixed. Before you call the datepicker function get the monthnames array, put them in a new variable and change shortnames by calling on that variable:

var fullmonth_array = $.datepicker.regional['nl'].monthNames; // change 'nl' to your own language of course
   changeYear               : true,
   changeMonth              : true,
   yearRange                : "-85:-18",
   maxDate                  : "-18Y",
   minDate                  : "-85Y",
   monthNamesShort          : fullmonth_array
   // other stuff
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download