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

Event filter date formats don't match examples in labels without a datepicker #190

Open
robbieaverill opened this issue May 1, 2019 · 3 comments

Comments

@robbieaverill
Copy link
Contributor

CWP 2.3.x-dev

In a browser without HTML5 date field support (e.g. Safari) if you enter the dates in events or news CWP pages using the format in the field labels and search, it comes back as a different format to that suggested:

image

You don't notice this with a date picker field because it presents it as a browser rendered UI control instead.

@brynwhyman
Copy link

brynwhyman commented May 2, 2019

Taking the NZ govt style guide as a reference (it doesn't explicitly call this out) we should look at changing the expect format in the backend and field label to be dd mm yyyy, not yyyy mm dd as part of this too.

Reference: https://www.govt.nz/about/about-this-website/style-and-design/the-govt-nz-style-guide/#numbers-dates-and-times

Edit: This would also align with what the date picker that browsers like Chrome and Firefox provide:

image

@sachajudd
Copy link
Contributor

@robbieaverill was this fixed in #59?

@robbieaverill
Copy link
Contributor Author

@sachajudd - #59 changed the format of the labels to match the example input format when you're using a browser that supports date picker fields.

This issue still remains in that if your browser doesn't support native HTML5 datepickers, the field label example is still not the same as the input field. The label would say (example 12/05/1995) but the field's format would be 1995-05-12.

My suggestion would be to drop the example from the label entirely.

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

4 participants