Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CalendarDateField implemented in 2.4RC1?

Go to End

11 Posts   4836 Views


Community Member, 114 Posts

7 May 2010 at 2:47am

Edited: 07/05/2010 6:53am

this turned out to be a really annoying problem. if your local is sent to US the dates validate as US date (mm/dd/yyyy) - but the available calendars input the date as (dd/mm/yyyy) so validation fails on any day over 12 (and gets the date wrong anyway if it is under 12). my solution was to use the datepickerfield from from dataobjectmanager but I had to alter line 6 of "dataobject_manager/code/date_picker_field/DatePickerField.php" from

static $dateFormat = "dd/mm/yy";
static $dateFormat = "mm/dd/yy";

so US dates work.


Community Member, 45 Posts

13 June 2010 at 4:02pm

fyi - i was able to avoid modifying the core code and set the US format in the main _congif.php file with the following:


this seems to work when using DatePickerField on pages and dataobjects.


Community Member, 114 Posts

16 June 2010 at 6:38am

Edited: 16/06/2010 6:45am

that works, and should be added to this page somehow:

Go to Top