VulcanJS / Vulcan-Starter

VulcanJS starter repo. Use as a base for your own VulcanJS projects.
MIT License
127 stars 88 forks source link

Bug in Example-Form - Expected type Date for field “Date”, received “2019-02-21T13:00:00.000Z” instead #118

Closed bseng closed 5 years ago

bseng commented 5 years ago

Hi,

I'm adopting example-form nested techniques in my own code and add a new date field in the address schema.

The proper input display but after I picked a date and try to save it give me an error saying.

Expected type Date for field “Date”, received “2019-02-21T13:00:00.000Z” instead

How should I get the date to work? Thanks

SachaG commented 5 years ago

With a normal form at least date fields do seem to be stored as dates (when inspecting the state of the SmartForm component). So maybe this is an issue specific to nested forms? Could you see if you get the same issue when the date field is not nested but instead at the root of the document?

bseng commented 5 years ago

I've use the date field in the normal schema (vulcan one) on root level and it works.

I've seen in the code that it can flatten the nested schema, do you think it will help in such case?

SachaG commented 5 years ago

I'm not sure… but can you open a new issue on the main repo about this? https://github.com/VulcanJS/Vulcan/issues

bseng commented 5 years ago

sure

bseng commented 5 years ago

Created a new issue in main repo

eric-burel commented 5 years ago

This issue will be resolved when we handle nested schemas, probably in the next release.

Closing because this repo is only for the starter itself.