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   492 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, 5513 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