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

Date widget in list returning Datetime instead of Date #1119

Closed
thebetternewt opened this issue Feb 19, 2018 · 3 comments
Closed

Date widget in list returning Datetime instead of Date #1119

thebetternewt opened this issue Feb 19, 2018 · 3 comments

Comments

@thebetternewt
Copy link

- Do you want to request a feature or report a bug?

- What is the current behavior?

- If the current behavior is a bug, please provide the steps to reproduce.

- What is the expected behavior?

- Please mention your CMS, node.js, and operating system version.

- Please link or paste your config.yml below if applicable.

I'm using a date widget in a list, but noticed it was returning a datetime stamp instead of a date formatted "YYYY-MM-DD" as described in the docs (date widget). My json file after creating dates from within the CMS:

{
"blackout_dates": [
{
"note": "Vacation",
"start_date": "2018-02-19T06:00:00.000Z",
"end_date": "2018-02-23T18:50:33.987Z"
}
]
}

config file: config.yml

For now I have just set a "format" option with the value "YYYY-MM-DD" to enforce the expected output.

@erquhart
Copy link
Contributor

Yep we're definitely not setting that default format anywhere in the codebase. This applies to both the Date and DateTime widgets.

@erquhart
Copy link
Contributor

Actually we are setting the default as what you're seeing, a full date and time ISO8601, which is correct for the DateTime widget only. Opening a PR to fix default for the Date widget.

@thebetternewt
Copy link
Author

Thanks guys!

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

No branches or pull requests

2 participants