Date formats: Are Editor and the "ultimate" plugin using different formatting codes?

Date formats: Are Editor and the "ultimate" plugin using different formatting codes?

atcclearsatcclears Posts: 24Questions: 7Answers: 0

It seems that MMM DD, YYYY would give me "May 13, 2015" with the "ultimate" plugin.
http://datatables.net/blog/2014-12-18

With Editor, it seems I would need to specify M d, yy to get the same result of "May 13, 2015".
https://editor.datatables.net/examples/simple/dates.html

Is this observation correct? If yes, is there any way to use the same formatting string for both, or do I need to plan for this difference?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    edited May 2015 Answer ✓

    This is correct - the "ultimate" plug-in is using Moment.js to perform its date / time calculations, while the date type uses jQuery UI's date formatter when jQuery UI is included on the page.

    The only way to have the two use the same format is to use a different date picker - one that uses Moment.js specifically. You might consider this plug-in which does use Moment according to the required library's own documentation.

    Allan

  • atcclearsatcclears Posts: 24Questions: 7Answers: 0

    Allan, thx as always for the quick reply!

This discussion has been closed.