-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Description
Description
We enabled the calendar feature on our forum. It worked fine, until an "Invalid date" error appeared when posting an event past the 12th of the month… which is almost certainly a parsing error of french date format (dd/mm/YYYY instead of american mm/dd/YYYY).
Changing the forum default date format to "%d %B %Y, %H:%M:%S" fixed the problem, but now the calendar date picker displays dates as "24 Novembre 20…" (long french format that does not fit in the box).
Also manually typing the date into the picker using french short format dd/mm/YYYY causes the "Invalid date" error.
Users of our forum are all french and I expect them to input "invalid dates" frequently.
Expected behaviour :
- picking the date using the date picker component should allow to send the form with a date format that can be parsed by the server
- manually entering the date should be disallowed or mark the field as invalid if the typed value can’t be parsed
- french users (and locales with similar date formats) should be able to input dates in a short, familiar format
Steps to reproduce
- Enable calendar on an smf forum with french translation
- Post an event with a date past the 12th of the month (25th of december 2022) OR type directly the date in usual french format (25/12/2022) => the date picker is not marked as invalid, the preview works, but submitting the event leads to an "Invalid date" error page
Environment (complete as necessary)
- Version/Git revision: 2.1.2
- Database Type: mysql
- Database Version:
- PHP Version: 7.3
Additional information/references
Don’t every brother support input type="date" nowadays?
Reactions are currently unavailable