Datepicker 24 hour format

Out of the box it seems the plone datepicker (pat-pickadate) uses am/pm timeformat, as well as a dateformat like "marts 17, 2018".
(The month has been translated correclty, but the format is wrong - correct would be "17. marts 2018")

Currently the pattern options look like this:


How do I customize these settings?

Plone 5.1


The date and time formats for the datepicker pattern are set i translation files for the plone domain:
pickadate_date_format and pickadate_time_format

It is a little disorienting that
a) The usual date_format_long and date_format_short (used in listings etc.), and all the strings for months and days, are defined for the plonelocales domain - the datepicker translations has to be in the plone domain

b) The format strings are different - date_format_long and date_format_short uses strftime formating, while the datepicker formats uses some javascript based format (which one? does not seem to be similar to jquery ui datepicker )

by hacking around this format string solved the issue for me:

#. Default: "mmmm d, yyyy"
msgid "pickadate_date_format"
msgstr "d. mmmm, yyyy"

#. Default: "h:i a"
msgid "pickadate_time_format"
msgstr "H:i"
1 Like

there is some use of moment.js in Plone so maybe it's the same with datepicker.

There is some interest in rationalizing the use of moment.js ... How to disable moment.js relative dates?