AM/PM picker not displayed for some locales
See original GitHub issueThe date time picker use locale to determine if the hour format is 12 or 24, but this is not always the best way. for example, if the locale is “zh-Hans-CN” it will use 12 hours format, but in China the 24 hours format is the primary time format.
further more, even use 12 hours format, the time result is also not correct for “zh-Hans-CN”
The Intl.DateTimeFormat with “zh-Hans-CN” locale will format the time “15:00:00” to “下午3:00:00” where (下午 is pm), but datetime picker finally dispaly the time as 3:00:00.
Is it possible we add an option such as “h24”, and if it has value, just pass it to the formatDate function, and in this function, check if the parameter “h24” has value or not, and set “hour12” to true or false when call new Intl.DateTimeFormat
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@wojtekmaj 2.1.1 works, thanks!
My bad, try 2.1.1.