Skip to content

Update ampm-field to meridiem-field#42397

Open
pardeyke wants to merge 2 commits into
twbs:v6-devfrom
pardeyke:patch-2
Open

Update ampm-field to meridiem-field#42397
pardeyke wants to merge 2 commits into
twbs:v6-devfrom
pardeyke:patch-2

Conversation

@pardeyke
Copy link
Copy Markdown

@pardeyke pardeyke commented May 5, 2026

The wrong specifier was used so the actual fix was no applied.

::-webkit-datetime-edit-ampm-field -> ::-webkit-datetime-edit-meridiem-field

The wrong specifier was used so the actual fix was no applied.

::-webkit-datetime-edit-ampm-field -> ::-webkit-datetime-edit-meridiem-field
@pardeyke pardeyke requested a review from a team as a code owner May 5, 2026 17:43
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 May 5, 2026
@mdo
Copy link
Copy Markdown
Member

mdo commented May 18, 2026

Do you have a reference to link for this change @pardeyke?

@pardeyke
Copy link
Copy Markdown
Author

Documentation is really sparse on this. I could do a quick CodePen to demonstrate?!

@alpadev
Copy link
Copy Markdown
Contributor

alpadev commented May 18, 2026

Not sure it helps but those seem to be the browser stylesheet's selectors.

For Chromium based

-webkit-datetime-edit-ampm-field
-webkit-datetime-edit-day-field
-webkit-datetime-edit-hour-field
-webkit-datetime-edit-millisecond-field
-webkit-datetime-edit-minute-field
-webkit-datetime-edit-month-field
-webkit-datetime-edit-second-field
-webkit-datetime-edit-week-field
-webkit-datetime-edit-year-field

Source: https://chromium.googlesource.com/chromium/blink/+/refs/heads/main/Source/core/css/themeInputMultipleFields.css#34

For Webkit based

-webkit-datetime-edit-year-field
-webkit-datetime-edit-month-field
-webkit-datetime-edit-day-field
-webkit-datetime-edit-hour-field
-webkit-datetime-edit-minute-field
-webkit-datetime-edit-second-field
-webkit-datetime-edit-millisecond-field
-webkit-datetime-edit-meridiem-field

Source: https://github.com/WebKit/WebKit/blob/bac6277a4d2263eb20960dd78a94e248482c8624/Source/WebCore/css/html.css#L540

A similar fix is also mentioned here: https://gomakethings.com/fixing-temporal-input-styling-in-safari/#fixing-temporal-input-height-in-safari

@pardeyke
Copy link
Copy Markdown
Author

Ah @alpadev that makes sense. So we should keep both

Added support for am/pm field in WebKit datetime edit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

4 participants