Replies: 1 comment
-
It is meant to work as a normal input
Yeah I agree we could add a |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would expect
inputProps={{oChange: () => ...}}
to be triggered after selecting a day.Even looking through the code it definitely looks like it should be executed as can be seen here:
https://github.com/gpbl/react-day-picker/blob/master/src/DayPickerInput.js#L394
I suppose I would expect
onChange
would be triggered beforeonDayChange
somewhere around here:https://github.com/gpbl/react-day-picker/blob/master/src/DayPickerInput.js#L491
For now, I can accomplish it by using
onDayChange
+parseDate
to get what I want done.I did not see anyone else reporting this issue to me it seems like a bug or possibly by design.
And, unrelated to this but in the way I am dynamically creating this (I hook up validation in a separate centralized file allowing for dynamic form creation / validation), it would be nice if onDayChange also included the DayPickerInput props so I can use
parseDate
from there instead of having to know which parseDate is being used.Beta Was this translation helpful? Give feedback.
All reactions