dayjs
dayjs copied to clipboard
[isValid] function not works properly.
Describe the bug
How the hell on earth with any string + one random number at the end with space -> the .isValid() is still return true
dayjs(what_ever_string_you_input 999).isValid()) -> true ?
Expected behavior It should return false instead.
Information
- Day.js Version in "Antd": "^5.9.1", -> maybe need check with Antd
- OS: window
- Browser: Edge Version 119.0.2151.44 (Official build) (64-bit)
- Time zone: GMT+7
This! It makes no sense. The same happens with the native JS Date object.
Facing same issue. Any update?
This works properly in date-fns: https://github.com/date-fns/date-fns/tree/main/src/isValid