Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Lachlann 344 posts 626 karma points
    Apr 08, 2015 @ 22:07

    Umbraco 7.2 Forms 4.0.3 Change Date in FRONT END date picker

    Hi Guys,

    I am trying to change the format of the date that is chosen in the Datepicker field type when it is rendered in the front end (I have changed the backend date format by changing the site culture)

    Currently the date is formated as Fri Apr 17 2015 i need it to be Fri 17 Apr 2015.

    Any help or pointers on this would be very much appreciated. I have noted that in the Script.cshtml that there is this line:

    var contourDateFormat = "@Html.ConvertDateFormat()";

    but changing this doesnt really seem to do anything.




  • Nathan Woulfe 442 posts 1657 karma points MVP 5x hq c-trib
    Apr 09, 2015 @ 01:31
    Nathan Woulfe

    Hi Lachlann

    I've had to make similar changes, you'll need to edit this file


    Down around line 36, fiddle with this (Date format options are here)

    $(".datepickerfield").datepicker({ dateFormat: 'd MM yy' });

    Hope that helps.


  • Lachlann 344 posts 626 karma points
    Apr 09, 2015 @ 10:43

    Hi Nathan,

    thanks for your suggestion, however i think that your amned is for contour and not the new Umbraco Forms, the code layout for Umbraco forms seems ot be similar ,there is now a umbraco.forms.js file but I cant find where the date picker is instansiated.



  • Lachlann 344 posts 626 karma points
    Apr 09, 2015 @ 11:38

    Okay further looking has found that pikaday tried to use moment.js if it is available, for whatever reason though moment.js was not being output on the page. If i do output moment.js on the page then the default format string defined inpickaday is used, If i change this format string then the string displayed in the date field is altered, however if i try and make it fancy for example "Thursday, 15th April 2015" then the value is not saved in Umbraco.

    I think for my case this is a would like to have requriment so I am not going ot persue it any further.



  • Claushingebjerg 926 posts 2528 karma points
    Apr 23, 2015 @ 09:26

    Post failure, please ignore

Please Sign in or register to post replies

Write your reply to: