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

datetime field widgets don't work as expected #786

Open
djay opened this issue Dec 19, 2016 · 0 comments
Open

datetime field widgets don't work as expected #786

djay opened this issue Dec 19, 2016 · 0 comments

Comments

@djay
Copy link
Contributor

djay commented Dec 19, 2016

User problem

The current code base has three options for widget "default", "combination", "jquery". This don't make much sense to the user and they have different quirks.

Default

Is trying to be both a simple input in a custom format, and also use html5 type="date" expects the value set only in a single format YYYY-MM-DD so doesn't work with a custom format. When the native widget is used, it will use local settings not our custom format. There is no warning to the user that using type="date" is going to give different results on different browsers or their format is ignored.

Combination

Is badly named. In fact this should be default. It's the most basic as it splits the input into different fields and is the most backwards compatible. if not default "manual" is perhaps the best name?

jquery

Users don't know what jquery is. Need to state if it supports progressive enhancement. Need to give an indication of what kind of widget. Also, the current time control is horrible and doesn't allow any time to get set which means it shouldn't be used.

Options

Suggest changing to following set of widgets

Single input

Replaces default. Single input field (or maybe 1 for date and 1 for time?). Data has to be entered in the desired format.

Could enhance it with single input using html5 pattern to force input only in a certain format. and Give hint about what that format is. (see http://www.wufoo.com/html5/types/4-date.html)

Split input

All numeric split into seperate fields for maximum compatibility

Calendar

I think one based on the following standard would be good. http://webarchive.nationalarchives.gov.uk/+/http:/www.isb.nhs.uk/documents/isb-1502/dscn-02-2010/.
Works without JS so is progressive enhancement.
Allows free text input and gives assistance about ambiguous formats.

Native (or html5)

Disable format selection or at least warn the format will be ignored.
Warn about browser incompatibility issues (see http://www.wufoo.com/html5/types/4-date.html)

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

1 participant