-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date and datetime persisted values may not conform to specified format #3702
Comments
I think this is actually a pretty complex issue. I did not find an widget with the required logic to mimic it nor an abstraction to build on top of it. The hack I found is too outside of the packages to be easily integrated as a long term solution. Related to |
It's because the value is a Date object when the frontmatter is loaded. The initial value of date / datetime widget is not formatted. If you check the preview after you refresh admin site, you'll find the date is like There may be some solutions but I haven't tested:
|
Your analysis is correct and thank you for posting the PR. |
I came across the same issue in netlify-cms 2.10.49 Sadly I can't figure out how to fix this without implementing a custom date-widget. Could someone describe where to call the handleChange? Is it configurable for each field? |
Hi folks many thanks for your great work.
Describe the bug
Date and datetime can be improperly persisted.
To Reproduce
2020-05-06
)2020-05-07T00:00:00.000Z
)Applicable Versions:
CMS configuration
https://github.com/betagouv/beta.gouv.fr/blob/master/admin/config.yml
https://github.com/betagouv/beta.gouv.fr/
Additional context
In my specific context, I found a hack to prevent that inappropriate behavior.
The text was updated successfully, but these errors were encountered: