Reusable DatePicker component w/DayPicker V8 and React-hook-form? #1221
Unanswered
LeunensMichiel
asked this question in
Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reusable DatePicker component w/DayPicker V8 and React-hook-form?
I'm trying to implement reusable form fields like switches and checkboxes using React-Hook-Form. For a DatePicker field, this library looks very promising. However I'm stuck trying to get it to work with React-Hook-Form as it has its own
onChange
andonBlur
calls using theregister()
method. The value in the field itself updates correctly thanks to{...fieldProps}
, but printing the form values logs the previous selected date.Beta Was this translation helpful? Give feedback.
All reactions