Calendar field does not work with non numeric non english date formats.
The field does not able to recognise a date that contain textual format (like months, days names) for non english language.
In best it will store an empty value, in worst it will store a random value.
This affect all Joomla version from 3 to 5.
To fix the issue should be done following:
filterformat
, and lang constant DATE_FORMAT_FILTER_..
should be dropped.This also will fix issue related to deprected strftime()
.
Current workaround:
Always use only numeric date-time formats.
References:
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Agree 10000%
Agree, for those not knowing what
Intl
is, read this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormatThis brings back memories, bad ones...
Yup.
Just to add that TC39 has already approved, stage 3
Temporal
the replacement of theDate
class but waiting another standards body to agree on the timezones (or something similar).Temporal has ALL the known Calendars!!!
Temporal has a polyfill that could be used right now (it's just JS)
Temporal probably will be introduced on a later PHP
Basically, what I'm trying to say here is that the calendar could be way better with less code written here if someone puts the effort to do a GUI leveraging the Temporal polyfill (with some clever check, so the polyfill could be skipped for Browsers supporting it, some time in the future).