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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

user defined forms - change date format


Go to End


3 Posts   819 Views

Avatar
spierala

Community Member, 80 Posts

13 September 2011 at 2:04am

Hallo all,
is it possible to change the dateformat of the date pickers used in user defined forms?
i would like to have german date format.

thanks in advance,
florian

Avatar
Willr

Forum Moderator, 5523 Posts

14 September 2011 at 1:06pm

Looking at the code (https://github.com/silverstripe/silverstripe-userforms/blob/master/code/editor/EditableDateField.php#L43) it uses the date format you set with i18n::set_date_format().

Avatar
spierala

Community Member, 80 Posts

14 September 2011 at 7:46pm

hey willr!
thank you for your answer.
i tried to set in config.php:
i18n::set_date_format('dd.MM.YYYY');

but nothing changes. still the datefields show me a result like this: 09/14/2011

i use ss 2.4.5
cheers,
florian