Resume Craft: Your go-to platform for effortlessly tailoring ATS-friendly resumes to job descriptions. Streamline your job application process and stand out in the competitive market.
When we open the /enter-data route and try to submit the form when any date input already has some valid data pre-filled into it, then we see an error message "Expected date, received string". This is invalid since the pre-filled data should already be a valid data.
Steps To Reproduce
Locally serve the repository by running "npm run dev"
Do not enter any data, directly try to submit the data
The date field shows error "Expected date, received string"
Expected result
Error should not be shown since we have already submitted the form once
Screenshots
Are you willing to contribute to this issue?
Yes, but help is always welcomed.
Additional Details
This issue is probably because of startDate: z.date().optional().nullish() and endDate: z.date().optional().nullish() of durationFieldSchema in the file src\lib\types\form.ts. Try changing date() to string() and see if the issue is resolved.
Describe the bug
When we open the
/enter-data
route and try to submit the form when any date input already has some valid data pre-filled into it, then we see an error message "Expected date, received string". This is invalid since the pre-filled data should already be a valid data.Steps To Reproduce
Expected result
Error should not be shown since we have already submitted the form once
Screenshots
Are you willing to contribute to this issue?
Yes, but help is always welcomed.
Additional Details
This issue is probably because of
startDate: z.date().optional().nullish()
andendDate: z.date().optional().nullish()
ofdurationFieldSchema
in the filesrc\lib\types\form.ts
. Try changing date() to string() and see if the issue is resolved.Make sure to test different scenarios like: