Replies: 2 comments
-
My solution:
And this might be the place to add the change to make it happen (useInput.ts:141):
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Here the updated example with the fixed behavior: https://react-day-picker.js.org/advanced-guides/input-fields#input-with-inline-calendar |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
With the useInput Hook, when I unselect the date, the input field stays empty, when I empty the InputField, the selectedDate is reset to the initialDate.
Expected Behavior
Regardless of unselecting a date or deleting the whole date from the input, no date should be selected as long as the required attribute is not set.
Actual Behavior
After blurring the InputField it gets filled with the initial date again. Even if it looks in the Day Picker that the day was unselected by the InputField
(btw. I love how they play together and update each other on selecting/writing dates, great job!)
Steps to Reproduce
In https://playcode.io/react:
Possible Solution
Screenshots
If applicable, add screenshots or GIFs to help explain your problem.
Your Environment
Beta Was this translation helpful? Give feedback.
All reactions