Skip to main content

Bug Tracker

Side navigation

#14116 closed feature (notabug)

Opened July 09, 2013 01:19PM UTC

Closed July 09, 2013 01:29PM UTC

Last modified November 20, 2013 04:45PM UTC

Moment format vs jQuery UI datepicker format

Reported by: eonlepapillon Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:
Description

It's not a bug, but more a feature request or something to think about.

I use Moment and the jQuery UI datepicker. I have to support i18n and so formatting is a big deal for me.

I wish to use the format of Moment to control the format of the datepicker. But sadly there is a different in formatting. I can't exchange the formats.

For example, 'Day of month' is in Moment 'DD', but in the datepicker 'dd'. '4 digit year' is in Moment 'YYYY', but in the datepicker 'yy'.

MM/DD/YYYY is 07/09/2013 in Moment, but July/Tuesday/YYYY in the datepicker.

Format Moment: http://momentjs.com/docs/#/parsing/string-format/

Format datepicker: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js#L1272

It would be nice for every one when the format is the same in every library.

(moment ticket https://github.com/timrwood/moment/issues/890)

Attachments (0)
Change History (3)

Changed July 09, 2013 01:29PM UTC by timmywil comment:1

resolution: → notabug
status: newclosed

Bugs and feature requests related to jQuery UI can be filed at bugs.jqueryui.com.

Changed October 22, 2013 11:14AM UTC by anonymous comment:2

Got the same problem. Would be very nice to make the date picker compatible with moment.js abbreviations

Changed November 20, 2013 04:45PM UTC by anonymous comment:3

I've written some code to convert between different time formats. It's here, hope it helps: http://stackoverflow.com/q/20101603/119561