The code mentioned in the section "Input with Date Picker Dialog" throws an error #2139
Closed
karansethia
started this conversation in
General
Replies: 1 comment 1 reply
-
Thanks, there was a bug indeed in the docs. See https://react-day-picker.js.org/advanced-guides/input-fields#input-with-inline-calendar |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
link => https://react-day-picker.js.org/advanced-guides/input-fields
re-writing the onSelect prop worked our for me
<DayPicker
initialFocus
mode="single"
selected={selectedDate}
onSelect={(date) => handleSelect(date as Date)}
/>
Im not sure if this is the correct way and if there is a correct way to pass handleSelect function to onSelect prop please, update the docs
Beta Was this translation helpful? Give feedback.
All reactions