Skip to content
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

Support date object on Date widget #3583

Closed
adongy opened this issue Apr 12, 2020 · 1 comment
Closed

Support date object on Date widget #3583

adongy opened this issue Apr 12, 2020 · 1 comment

Comments

@adongy
Copy link

adongy commented Apr 12, 2020

Is your feature request related to a problem? Please describe.
Hi,

netlify-cms supports parsing date objects on some formats (such as TOML).

In that case, multiple formats are supported: either a raw Date object, such as 2020-04-08T09:03:16.371Z, or a simpler date object as defined here:

https://github.com/netlify/netlify-cms/blob/7fcdaef1c92c65d981ac2ebc1077d8da0c3ca285/packages/netlify-cms-core/src/formats/__tests__/frontmatter.spec.js#L84-L93

By default, the date and datetime widgets with no format set will dump the complete Date object.

I'd like to be able to write the shorter YYYY-MM-DD style too.

Describe the solution you'd like
It could be implemented with a new option.

Describe alternatives you've considered
I am unaware of any combination of current options to write a custom format that is unquoted.

Thanks!

@martinjagodic
Copy link
Member

Closing as stale and/or outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants