There were two issues in the <datepicker> component that are addressed by this MR:
The date passed in was not getting formatted according to the format prop, which can cause unnecessary validation issues
The date was being parsed by new Date which comes with all sorts of quirks and problems, and is generally not recommended. We now use date-fns.parse which should avoid these issues.
Also updating the docs to:
Show the right default format
Take in an ISO date in the demo (as a test of this change)
There were two issues in the
<datepicker>
component that are addressed by this MR:format
prop, which can cause unnecessary validation issuesnew Date
which comes with all sorts of quirks and problems, and is generally not recommended. We now use date-fns.parse which should avoid these issues.Also updating the docs to: