Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Invalid Time Format when date is chosen using the DatePicker #15

sminnee opened this Issue · 2 comments

3 participants


Copied from

SilverStripe? 2.4.0 Blog 0.4.0

When locale settings are set to en_us, the DatePicker? on a blog entry creation page in the CMS still uses DD/MM/YYYY format, instead of MM/DD/YYYY. This also causes an error when trying to save, because the CMS is expecting MM/DD/YYYY or an expanded date (Month DD, YYYY).



I fix those problem in 2 steps.
1) patch the DateField.php class in the framework, it was not passing the locale to jquery, so the fate picker was always in english, whatever the user language was. you can find the modified class here:

2) i modified the date format displayed in the blog entry. Because for my particular case, using the French Language, Jquery short version of Juillet (July) is Jul and Zend Locale short version of Juillet is Juil. so totaly different, that cause trouble at date validation when saving the blog entry.
I simply add a line after line 69 of BlogEntry.php:

this all language understand it, as it's numbers.


@sminnee Tested on SS 2.4, blog 0.5 and using a en_US locale correctly shows and parses dates. I think @otiteca 's referring to an issue with the DateField on 3.0, so it's ok to take this discussion to the framework issue list instead. Seems fine with fr_FR locale also!

@tractorcow tractorcow closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.