Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Bug Fixes

- `DateCalendar`: Fix disabled selected day having darker background than other disabled controls. [#77138](https://github.com/WordPress/gutenberg/pull/77138)
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entry formatting is inconsistent with surrounding bullets (which wrap the PR link in parentheses and end with a period). Please update this line to match the existing pattern so tooling and readability stay consistent.

Suggested change
- `DateCalendar`: Fix disabled selected day having darker background than other disabled controls. [#77138](https://github.com/WordPress/gutenberg/pull/77138)
- `DateCalendar`: Fix disabled selected day having darker background than other disabled controls ([#77138](https://github.com/WordPress/gutenberg/pull/77138)).

Copilot uses AI. Check for mistakes.
- `Autocomplete`: Fix value comparison to avoid resetting block inserter in RTC ([#76980](https://github.com/WordPress/gutenberg/pull/76980)).
- `ValidatedRangeControl`: Fix `aria-label` rendered as `[object Object]` when `required` or `markWhenOptional` is set ([#77042](https://github.com/WordPress/gutenberg/pull/77042)).
- `Autocomplete`: Fix matching logic to prefer longest overlapping trigger ([#77018](https://github.com/WordPress/gutenberg/pull/77018)).
Expand Down
11 changes: 6 additions & 5 deletions packages/components/src/calendar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,14 @@ $wp-components-calendar-preview-border-color: color-mix(in srgb, $components-col

// Selected date button (individual date, range start, and range end)
.components-calendar__day--selected:not(.components-calendar__range-middle) {
&:has(
.components-calendar__day-button,
.components-calendar__day-button:hover:not(:disabled)
) {
&:has(.components-calendar__day-button:not(:disabled)) {
color: $components-color-foreground-inverted;
}

&:has(.components-calendar__day-button:disabled) {
color: $components-color-disabled;
}
Comment on lines 229 to +236
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Within the selected-day rule, the enabled-state :has(.components-calendar__day-button:not(:disabled)) check is redundant because a selected day always contains a day button. You can simplify by applying the inverted text color by default for selected days and only using a single :has(.components-calendar__day-button:disabled) override for the disabled case, reducing selector complexity and :has() usage.

Copilot uses AI. Check for mistakes.

.components-calendar__day-button {
&::before {
background-color: $components-color-foreground;
Expand All @@ -244,7 +245,7 @@ $wp-components-calendar-preview-border-color: color-mix(in srgb, $components-col
}

&:disabled::before {
background-color: $components-color-disabled;
background-color: $components-color-gray-100;
}

&:hover:not(:disabled)::before {
Expand Down
11 changes: 9 additions & 2 deletions packages/dataviews/src/dataform/stories/layout-regular.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@ const fields: Field< SamplePost >[] = [
{
id: 'date',
label: 'Date',
type: 'date',
},
{
id: 'datetime',
label: 'DateTime',
type: 'datetime',
},
{
id: 'birthdate',
label: 'Date as options',
label: 'DateTime as options',
type: 'datetime',
elements: [
{ value: '', label: 'Select a date' },
Expand Down Expand Up @@ -324,7 +329,8 @@ const LayoutRegularComponent = ( {
status: 'draft',
reviewer: 'fulano',
email: 'hello@wordpress.org',
date: '2021-01-01T12:00:00',
date: '2021-01-01',
datetime: '2021-01-01T12:00:00',
birthdate: '1950-02-23T12:00:00',
sticky: false,
can_comment: false,
Expand Down Expand Up @@ -362,6 +368,7 @@ const LayoutRegularComponent = ( {
'email',
'password',
'date',
'datetime',
'birthdate',
'can_comment',
'filesize',
Expand Down
Loading