native date picker expects date, but zod validation requires datetime #1034
insanity54
started this conversation in
General
Replies: 1 comment
-
One I would drop the use of v-model, you're not using it in any way that would be beneficial, second you can use |
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
-
I'm having some trouble implementing FormKit date with zod validation. My intent here is to create a form with a start and end date. After filing in details, I want to submit the form to the backend which validates the form then starts a long-running task.
What I'm seeing is 'Invalid datetime' validation error below each date picker. This makes sense, as the date picker uses YYYY-MM-DD date strings. The date picker has date only, without time. My intent is to convert these date strings into datetime strings in the request body, but this isn't possible. Validation occurs before the POST is made, fails, and the request is never made.
Here is my schema
Is there any recommended approach here?
Beta Was this translation helpful? Give feedback.
All reactions