Problem/Motivation
Date field elements have:
- Complicated configuration
- Inconsistent behaviour between similar elements
- Poor layout
- Restrictive default values
- Unhelpful labels or descriptions
- Useless error messages
- too tight or too loose validation
Goal/s
To have a consistent user experience when working with the date and time related elements (Widgets and Formatters)/
Background
- Each date and time related field belongs to a core module.
- Date fields are added to bundles/nodes/entities to hold data
- Widgets are used for inputting/updating this data. These are configured on the form display settings of the bundle
- Formatters are used for showing the held data on a range of displays.
Proposed resolution
This is an epic and very long term plan. There are quite a few ways to categorise the tickets. Firstly by UX categories. Then by the sub-components of the date related core modules.
Remaining tasks
- Define the best practices and the Drupal way of doing each of these UX goals, Add them to the usability guide
- Assess each best pratice on each sub component doing a usability study
- Create tickets for each of the changes needed on the relevant module and tag those tickets with "Usability", the component, the sub component and the UX category.
- FIX THE BUGS!!
Drupal Form element UX best practices
UX categories
- Streamlined Configuration
- Consistent Behaviour
- Clear Layout
- Default Values
- Helpful Labels and descriptions
- Useful error messages
- Validation
Streamlined Configuration
Problem/s Formatting dates using the PHP method is non-intuitive.
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
Formatters
Timestamp module
Field/s
Widgets
Formatters
Consistent Behaviour
Problem/s There are slight differences between the datetime and timestamp widgets, but from the user's perspective the there shouldn't be.
Solutions Which format should we go with?
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
Formatters
Timestamp module
Field/s
Widgets
Formatters
Clear Layout
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
Formatters
Timestamp module
Field/s
Widgets
Formatters
Default Values
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
Formatters
Timestamp module
Field/s
Widgets
Formatters
Helpful Labels and description
problems When on a browser that doesn't use the HTML5 inputs, there is no clear indication of what field is what, especially w/o the polyfill, b/c the labels are invisible
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
Formatters
Timestamp module
Field/s
Widgets
Formatters
Useful error messages
Error Messages
Problem/s "Error messages aren't great" - In some cases these are just plain wrong. E.g. the date might be dd/mm/yyyy and the error message tells you to put you yyyy-mm-dd.
Solutions
- The user should see a message that tells them what went wrong and what they can do next to fix the problem
- The messages should be consistent across the widgets.
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
Formatters
Timestamp module
Field/s
Widgets
Formatters
Validation
Datetime module
- Field/s
- Widgets
- Formatters
Daterange module
Field/s
Widgets
The date range widget should leverage client side validation to help prevent end is less than start
Formatters
Timestamp module
Field/s
Widgets
Formatters
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | firefox.png | 5.37 KB | mahtabalam |
| #9 | chrome.png | 5.04 KB | mahtabalam |
Comments
Comment #2
mpdonadioGoing to go through and link the relevant issues here, so we can weed out the duplicates. Many are in the datetime.module component, but a bunch are in forms system, field system, or somewhere else.
Comment #3
mpdonadioHere are a bunch in datetime.module. Didn't look through them yet to see if any are dups.
Comment #5
kattekrab commentedOh my goodness!
Yes let's!
Sorry for delayed response here, but I just stumbled on this after seeing progress on one of the linked issues.
This is one of the "death by 1000 paper cuts kind of issues, it would be great to tackle holistically, systemically, and get consistent behaviour everywhere!
Comment #9
mahtabalamThe design of Date and time field is different in chrome and firefox.
Drupal Version
8.7.3
Comment #14
quietone commenteddoing Bug Smash triage and I found myself here, after closing some datetime duplicates.
I think it would be helpful if someone familiar with these problems added a priority for fixing this remaining issues, which are now in the IS.
Comment #15
andypostComment #19
jaime@gingerrobot.com commentedComment #20
jaime@gingerrobot.com commentedComment #21
jaime@gingerrobot.com commentedComment #22
jaime@gingerrobot.com commentedComment #23
jaime@gingerrobot.com commentedComment #24
jaime@gingerrobot.com commentedComment #25
jaime@gingerrobot.com commentedComment #26
jaime@gingerrobot.com commentedComment #27
jaime@gingerrobot.com commentedComment #28
jaime@gingerrobot.com commentedComment #29
jaime@gingerrobot.com commentedComment #30
jaime@gingerrobot.com commentedComment #31
jaime@gingerrobot.com commentedComment #32
jaime@gingerrobot.com commentedComment #34
ressaThis is great, thanks! I recently proposed a date standard in #3467914: Define a standard for Date formats and #3467829: Use ISO 8601 format in Authored on field date picker after the human readable Drupal core date formats were updated in #3466529: Use easily recognizable date format. Perhaps defining a standard could help this issue move forward?
Comment #35
markdcEdited for clarity.