Skip to content

Day and month are switched on manual input #2728

Closed Answered by Eonasdan
bas-jansen asked this question in Q&A
Discussion options

You must be logged in to vote

In javascript if you create a data e.g. new Date('07/12/2022') the date will be July 11, 2022. The old date picker used momentjs to attempt to handle formats that where not en-US format. In order reduce the external dependencies (and momentjs is no longer being updated), I opted to make use of the native JS date object and Intl. However, neither of those support providing custom format parsing. There are ways to provide custom parsing on your own or use the customDateFormat plugin.

That plugin might be rolling into the main picker but I haven't had time to do that.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Eonasdan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #2727 on December 06, 2022 19:38.