Hi guys, I am using the UI datepicker and I have already limited the date range possible, bt now, I also want to change the format becuase my mysql database is not storing the dates as the format is not the ISO format(yyyy-mm-dd), it is more like(dd-mm-yy), here is my code please! :
$(function() { $("#datepicker").datepicker({minDate: +7, maxDate: '+4M +10D'}); });
+1
A:
Check - http://docs.jquery.com/UI/Datepicker/$.datepicker.formatDate
Easy as replace dd/mm/yy with format of choice :)
.datepicker({ dateFormat: 'dd/mm/yy' });
Si Philp
2009-11-05 09:25:56
A:
thank you guys, but what worked for min the end was changing the format in the ui datepicker.js script, it was that simple. thank you for anwering though
Nwakego
2009-11-07 07:59:34
A:
Well in do in the version for MooTools editing the .js script:
// MooTools.lang this.setOptions({ days: MooTools.lang.get('Date', 'days'), months: MooTools.lang.get('Date', 'months'), //format: MooTools.lang.get('Date', 'shortDate'), format: '%d-%m-%Y', selectTimeTitle : MooTools.lang.get('DatePicker', 'select_a_time'), timeConfirmButton : MooTools.lang.get('DatePicker', 'time_confirm_button') });
Mikel
2010-08-03 08:32:36