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.

All other Modules

Discuss all other Modules here.

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

user defined forms - change date format


Reply

3 Posts   488 Views

Avatar
spierala

13 September 2011 at 2:04am Community Member, 80 Posts

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

14 September 2011 at 1:06pm Forum Moderator, 5511 Posts

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

14 September 2011 at 7:46pm Community Member, 80 Posts

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