You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, this is great library and APIs makes so much sense to actual usage. This is 3rd one I tried, and it has been super fun to work with react-day-picker. A+++
Is your feature request related to a problem? Please describe.
I'd like to change how to handle input value change based on what key user types.
By adding original event object as 4th arguments, I can access key prop at the same time access public method. So that I can, for example, on ESC, retrieve cached data from state and apply that, or on Enter key, just call hideDayPicker, etc.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Combine inputProps onKeyDown event, but it seemed not straight forward.
This discussion was converted from issue #1000 on February 10, 2021 03:55.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, this is great library and APIs makes so much sense to actual usage. This is 3rd one I tried, and it has been super fun to work with react-day-picker. A+++
onDayChange(day, modifier, dayPickerInput, originalEvent)
Is your feature request related to a problem? Please describe.
I'd like to change how to handle input value change based on what key user types.
By adding original event object as 4th arguments, I can access key prop at the same time access public method. So that I can, for example, on ESC, retrieve cached data from state and apply that, or on Enter key, just call hideDayPicker, etc.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Combine inputProps onKeyDown event, but it seemed not straight forward.
Thanks again for a great package
Beta Was this translation helpful? Give feedback.
All reactions