-
Describe the bug To Reproduce |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is actually due to javascript date behavior. Try it in your console I think the easiest way to overcome is, is to use the parseDate method to correctly parse these dates. That in combination for example with date-fns/setYear:
|
Beta Was this translation helpful? Give feedback.
-
Is that something I need to do on my end or is that internal to the library? |
Beta Was this translation helpful? Give feedback.
-
On your end. But I do agree it should be handle by the date library the component uses. |
Beta Was this translation helpful? Give feedback.
This is actually due to javascript date behavior. Try it in your console
new Date(95, 1, 1)
and the year will be 1995, as you stated.I think the easiest way to overcome is, is to use the parseDate method to correctly parse these dates.
https://react-day-picker.js.org/api/DayPickerInput#parseDate
That in combination for example with date-fns/setYear: