Next step is to change the default format in pikaday.js file located in "/App_Plugins/UmbracoForms/Assets/pikaday/".
defaults = {
field: null,
bound: undefined,
position: 'bottom left',
// CHANGE THIS FORMAT
format: 'YYYY-MM-DD',
Once you have moment you can change the default format for output by changing the format value under "defaults" to something else.
that value will change what you see in field once you have chosen a date.
Umbraco Forms Pikaday & Moment working?
Hi,
I am trying to get another language working for a date picker (pikaday), when i'm trying to debug, i see moment.min.js is undefined (see screenshot)
I've tried to manually rename dates in pikaday, but still not working.
as you can see, the calendar is optimized for another language (dutch), but the input field still sets another format.
Where can i find the format, to change it, or how can I include this file to get it working properly. https://github.com/MatthewWilkes/django-pikaday/blob/master/djpikaday/static/moment/lang/nl.js
Hi,
We have the exact same problem, we have no clue where pikaday.js is added, moment.js is not found to set a moment. I'm very curious about a solution.
pikaday is set in the App_plugins>Assets. Still haven't figured it out yet.
I solve this issue by add moment.js with localization on site layout.
Hi Yakov, can you share the solution details? Thanks G.
Add script reference like ~/scripts/moment-with-locales.js you can download file from http://momentjs.com/
Thanks for your replay, but this did not solve the problem. Still Pickaday has default values.
Open up \Views\Partials\Forms\Script.cshtml
Add
under the 2 other scripts umbracoforms-conditions.js Should look like this;
Boom, you have moment.
Next step is to change the default format in pikaday.js file located in "/App_Plugins/UmbracoForms/Assets/pikaday/".
Once you have moment you can change the default format for output by changing the format value under "defaults" to something else. that value will change what you see in field once you have chosen a date.
I have moment-with-locales.min.js and have the format set
This works on most browsers unfortunately some browsers (old version of firefox) are still giving dates of "Thu Sep 22 2016" as the date.
This is a production issue for us :-(
Any other ideas?
is working on a reply...