Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14116 closed feature (notabug)

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)

Change History (3)

comment:1 Changed 6 years ago by timmywil

Resolution: notabug
Status: newclosed

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

comment:2 Changed 6 years ago by anonymous

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

comment:3 Changed 6 years ago by anonymous

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

Note: See TracTickets for help on using tickets.