iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
46.89k stars 2.3k forks source link

Invalid Date #2006

Open imdanielaalves opened 2 years ago

imdanielaalves commented 2 years ago

Describe the bug When I use dayjs and I enter an invalid date, according to the documentation, if the range is exceeded, it will bubble up to the months or years, according what I enter. Example: '60.07.2022' -> '29.08.2022' image

image

Expected behavior It's possible have a configuration to disabled that and keep what we enter and tell us just is a invalid date?

image

Information

Bykiev commented 2 years ago

Hi, you can use strict validation to validate the date. Here is a demo

Upd: I see you've created an issue in angular-datetime-picker repo. It seems to be not supported by this library.