Typing in a 5+ figure year to an empty date field results in inconsistent behaviour

Created on 27 January 2025, 4 days ago

Problem/Motivation

Typing the year in a Smart date range results in inconsistent behavior.
This issue is related to accessibility, but probably should be fixed as a usability but which would resolve the accessibility also.

Typing in a date has different behviour depending on if time has been set. The behaviour also depends on the year number - small numbers and large number show/hide the end date year.

Some or most of the problematic year-values are values that would not pass validation.

See video: https://youtu.be/qrBljuXi2KI

Steps to reproduce

  1. Add a smart date range field to content type limited to 1 item.
  2. Set widget Smart Date | Inline range with timezone.
  3. Edit content with the date first setting time, then date with years ranging from fe. 1 to 10000.

Proposed resolution

Might be mitigated by refraining from showing/hiding content until the date input loses focus.
Another possible point to look for fix i validation code.

🐛 Bug report
Status

Active

Version

4.2

Component

User interface

Created by

🇫🇮Finland simohell

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024