3 August 2010 at 3:39am
(Last edited: 3 August 2010 4:50am),
I'm having trouble setting the date format to en_GB (dd-mm-yyyy) format when using a UserDefinedForm page.
In mysite/_config.php, I set the i18n config to my locale which seems to work elsewhere on the site, just not here. The DatePicker field inserts an en_US formatted date, and when submitted, the CMS validates it against en_GB so I'm pretty sure it's just down to the DatePicker.
3 August 2010 at 6:39pm
The locale is hard coded in the UDF file. The files which you will need to edit are the EditableDateField.php file. getFormField() returns the datepicker so that needs to be passed the correct format using dateFormat (http://jqueryui.com/demos/datepicker/).
I have created a ticket for this work - http://open.silverstripe.org/ticket/5902.