[docs] Fix date range calendar demo after MUI X v9 update by LukasTy · Pull Request #48262 · mui/material-ui (original) (raw)

@LukasTy @claude

MUI X v9 replaced the multi-element DateRangePickerDay with a single ButtonBase, removing .MuiDateRangePickerDay-day and .MuiPickerDay-root classes. Update selectors to use v9 CSS variables and class names.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy changed the titleFix date range picker demo CSS selectors for MUI X v9 [docs] Fix date range picker demo CSS selectors for MUI X v9

Apr 10, 2026

@LukasTy LukasTy changed the title[docs] Fix date range picker demo CSS selectors for MUI X v9 [docs] Fix date range calendar demo after MUI X v9 update

Apr 10, 2026

@LukasTy @claude

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy @claude

PickersRangeCalendarHeader uses PickersArrowSwitcher which renders a Typography variant="subtitle1" for the month label — the original selector was correct.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy @claude

dayjs is immutable — .date() and .add() return new instances. The old code discarded the return values, so both startDate and endDate resolved to today, collapsing the range to a single date.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy LukasTy marked this pull request as ready for review

April 13, 2026 06:32

michelengelen

@LukasTy @claude

Add a regression test fixture for StaticDateRangePicker to catch styling regressions after MUI X major upgrades. Uses pinned dates for deterministic screenshots.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy @claude

Include the existing XDateRangeDemo from docs/src in the regression test import glob instead of creating a separate fixture, avoiding code duplication. Add required MUI X dependencies to the test workspace.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy @claude

The docs demo import broke in CI. Use a standalone fixture with pinned dates instead.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy @claude

A standalone fixture doesn't add enough value. Revert the test workspace dependency additions as well.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@LukasTy LukasTy deleted the claude/vigilant-goldwasser branch

April 13, 2026 14:30

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})