Date formats don't work in UK

Issue #2 new
George BOYD RATCLIFF created an issue

Selecting a date from the editor (for example Wednesday 28th October) produces a date of yyyy-10-We. I believe this is a simple Date.ToString format problem, possibly caused by our site having UK dates?

Comments (2)

  1. dave.jonker

    Same here in the Netherlands; not sure though that it has something to do with the country we live in :-) I also get a date in the "yyyy-11-We" format.

  2. Thomas Morris

    This is due to the format being hardcoded into the js. See this file:

    https://bitbucket.org/rbdigital/umbraco-multi-date-picker/src/c7978e911611b993f010a066f1fc29535647f0a8/source/RB.MultiDatePicker/Controllers/Dialog.js?at=1.0.0&fileviewer=file-view-default

    Suggest changing from "yyyy-MM-dd" to "L" as per the moment.js docs, which would provide multiple locale support. It would be better if this package allowed for you to set your own format of course ;)

    Umbraco datepicker uses this to format dates: http://momentjs.com/

  3. Log in to comment