1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-25 18:33:12 +02:00
Files
php-e107/e107_web
Nick Liu 23933885ca fix(datetimepicker): Handle manually entered dates with UNIX epoch
This supersedes commit 19578e9fee which attempted to fix the issue
but was limited to a specific date format (dd.mm.yyyy). The new
approach uses the datetimepicker's native parsing capabilities to
handle dates in any configured format.

When users manually typed dates in fields set with
`data-date-unix="true"` without clicking on the calendar widget, the
values weren't being converted to UNIX timestamps as expected. This
resulted in the date field not appearing to save its value.

The improved solution:
- Uses the picker's `getDate()` method to parse dates according to the
  configured format
- Properly handles timezone adjustments for datetime fields
- Includes better error handling and validation
- Works with all locale formats supported by the datetimepicker

Fixes #5412
2025-04-10 19:28:51 -03:00
..