Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How do i localize the date picker form element?
Mys site is in Danish and set to use Danish. (other dates render correctly).
When picking a date with the "Contour" date picker it retuns the date in american date format, and with months and days in english... Month headers on the calendar are in english too.
If you are using Contour try have a look at this post https://our.umbraco.org/forum/umbraco-pro/contour/37552-Date-picker-format on how to change the date format for the datepicker type.
Hope this helps,
Im using the new forms in 7.2.4... And the site is set to use danish as culture.
As i mentioned, i have dates in other places on the site, and they render correctly.
OK. So i went and changed some lines in /App_Plugins/UmbracoForms/Assets/pikaday/pikaday.js
previousMonth: 'Previous Month',
nextMonth: 'Next Month',
months: ['Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'July', 'August', 'September', 'Oktober', 'November', 'December'],
weekdays: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'],
weekdaysShort: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør']
Now the calendar is in Danish, but when picking a date, the text is written like this:
Wed Apr 22 2015
Where do i fix this?
Okay, Maybe this post can help you further https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/63876-Umbraco-72-Forms-403-Change-Date-in-FRONT-END-date-picker
The files that Lachlann are talking about is located here: /App_Plugins/UmbracoForms/Assets
Has the site been setup with a danish culture hostname?
Jan: Yes as mentioned above the site culture is danish, and other dates set in the views display correctly.
Ok, so i installed moments.js, and it got me a little further. Now im getting the date as number...
But still in the american format... I tried changing
val = d.ToShortDateString();
val = d.ToString("dd.MM.yyyy");
in /Views/Partials/Forms/Fieldtypes/FieldType.DatePicker.cshtml. But that made no difference...
For being "Easy forms" this is pretty hard :(
Any updates so far?
as far as I can see 'moments.min.js' inside the umbracoForms folder is not being used, when you import a form as a macro.
same problem: https://our.umbraco.org/forum/umbraco-pro/contour/61213-Umbraco-Forms-Pikaday-Moment-working
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted