"13-07-2013" should be saved successfully, in sql database will be "2013-07-13"
Either a fatal error will happen or a completely different date will get saved in database.
Joomla 4.2, PHP 8
Similar issue happens by the usage of custom field com_fields with a calendar field (date ony) in greek backend.
The issue doesn't happen in greek backend if the calendar field is set with:
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Yes by changing the value of DATE_FORMAT_CALENDAR_DATE to the english format, it will work, but it doesn't match the interests of a greek user. It is just a workaround.
In my comment I posted a constants with default value, you have to change them to your format.
Changing both DATE_FORMAT_CALENDAR_DATE
and DATE_FORMAT_FILTER_DATE
they should be in sync.
Thank you very much! Indeed the error came from the official greek language package:
DATE_FORMAT_CALENDAR_DATE="%d-%m-%Y"
DATE_FORMAT_FILTER_DATE="y-m-d"
I corrected DATE_FORMAT_FILTER_DATE to "d-m-Y", everything works like a charm.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-25 09:27:15 |
Closed_By | ⇒ | liuvz |
Make sure you edit both DATE_FORMAT_CALENDAR_DATE and DATE_FORMAT_FILTER_DATE.
Check this comment #37000 (comment)