My input and output should be ISO string (using react-hook-form and zod) #1963
Unanswered
princemuel
asked this question in
Support
Replies: 1 comment 1 reply
-
@princemuel, you can format a Example: <DayPicker
mode="single"
onSelect={ (date) => doSomething(date.toISOString() }
selected=( parse(dateAsIsoString) }
/> Also: better do not pass string to |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there. Please I'm using react-day-picker with react-hook-form and zod. My input and output should be ISO string. React-Day-Picker accepts the input as new Date(ISO-string) but is always returning the output as a date object instead of ISO-string. Please any ideas on how I can setup my zod schema to integrate with react-day-picker and properly convert the output? Thanks
Beta Was this translation helpful? Give feedback.
All reactions