Skip to content

TimeField resets dayPeriod segment when hour value is deleted #6793

Closed
@dspnorman

Description

Provide a general summary of the issue here

For TimeField values greater than or equal to 12, clearing the hour segment input causes the dayPeriod segment value to flip from "PM" to "AM".

🤔 Expected Behavior?

Each segment of a TimeField can be edited in place, and modifying the value of one segment input does not alter the value of the others, eg. clearing an hour value does not cause dayPeriod to change from "PM" to "AM" or vice-versa.

😯 Current Behavior

  • when a TimeField value includes an hour >= 12, and
  • the hour segment has focus, and
  • the user presses the delete key to clear the hour value

…the dayPeriod segment changes from "PM" to "AM"

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

  • enter a time with an hour greater than or equal to 12 in a TimeField
    • eg. on component documentation example, type "6:45 PM"
  • move focus to the hour segment
  • press delete
Screen.Recording.2024-07-29.at.11.55.01.AM.mov

Version

[email protected]

What browsers are you seeing the problem on?

Chrome

If other, please specify.

also in Safari

What operating system are you using?

macOS 14.5

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions