Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(date-picker): let Flatpickr parse date instead of doing it with n…
…ew Date() (carbon-design-system#431) JavaScript Date constructor does not have proper i18n support when a string is given. You'll see a very ambiguous spec at: https://www.ecma-international.org/ecma-262/6.0/#sec-date.parse In the particular case of carbon-design-system#396, `new Date()` seems to think `Y-m-d` format as an ISO8601 UTC-based string, whereas `Y/m/d` seems to be treated as a locale-specific, local-timezone-based string. It ends up with producing a date object for the former case, that is of six hours before the clock for users in Austin, and thus one day off for the date part. Fixes carbon-design-system#396.
- Loading branch information