Create language string override of DATE_FORMAT_CALENDAR_DATETIME = %m-%d-%Y %H:%M:%S
Open an existing article for editing
Save the article
Article saves without error
These warnings are displayed:
Invalid field: Created Date
Invalid field: Modified Date
Invalid field: Start Publishing
Joomla! 3.7.2
PHP 7.1
I am desperately trying to find COMPLETE and understandable documentation on the operation of the new calendar field, picker and translating the datetime format.
I have a custom component I would like to use a calendar field in but CANNOT because it must be m/d/Y and I can not get Joomla to save a record to the database if the format is anything but the standard non-user-friendly format.
It would be great if someone had a clue what was happening here. Thanks
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-26 07:22:47 |
Closed_By | ⇒ | Bakual |
The following four language strings are important for the translate feature of the calendar formfield:
The first two are how the calendar displays the format, with or without time respectively (
showtime
true or false in the XML)The second two are how the dates are expected to be sent, again with or without the time. The validation of the field is done using this format.
Please note the difference in the format syntax. The first is using
strftime
notation (JS needs to understand it) and the latterdate
notation. That's why we need both and they need to comply eachother.So your issue is solved if you also create an override:
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"
If you want to help improve the doc, feel free to edit https://docs.joomla.org/Calendar_form_field_type. It's a wiki.
Closing as not a core issue.