Closed TheYoxy closed 7 months ago
@TheYoxy thank you for this, wondering if this could potentially break anything for existing implementations, I'd assume not
I'd assume not too, as I feel that it causes more problems to keep in this state and the user should patch it if it ever want to keep the date object instead of getting the string value.
Description
As is, when serializing a date as JSON, it add annoying quotes in the output, which leads to error when coupling with zod.
I've added a case when not "stringify" form data while using
createFormData
method to use thetoISOString()
method instead of theJSON.stringify
.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
All the tests has been added inside the pr to match the issue encountered.
Checklist: