Skip to content

docs(material/datepicker): make comparison range distinguishable in example - #34090

Open
vinaycookscode wants to merge 1 commit into
angular:mainfrom
vinaycookscode:docs/datepicker-comparison-colors
Open

vinaycookscode wants to merge 1 commit into
angular:mainfrom
vinaycookscode:docs/datepicker-comparison-colors

Conversation

@vinaycookscode

Copy link
Copy Markdown

Fixes #31663

The comparison range in the date range picker comparison example uses the tertiary container colour, which is barely distinguishable from the primary range in some M3 themes (e.g. azure).

This is a follow-up to #34066, which had no visible effect. The calendar renders in an overlay outside the example component, so overriding the colour tokens on the host element never reached it. The tokens are now set through a panelClass, and the example uses ViewEncapsulation.None so the panel styles apply, as in the views selection example.

I tested this in a local Angular Material app with an azure theme. The comparison range is now amber while the primary range stays blue.

Before:

before

After:
after

@google-cla

google-cla Bot commented Nov 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@angular-robot angular-robot Bot added area: docs Related to the documentation area: material/datepicker labels Nov 6, 2026
…xample

The comparison range in the date range picker comparison example uses
the tertiary container colour, which is barely distinguishable from the
primary range in some M3 themes (e.g. azure).

The calendar renders in an overlay outside of the example component, so
the colour tokens are overridden through a `panelClass` instead of on
the host element. Also switches the example to `ViewEncapsulation.None`
so that the panel class styles apply, like the views selection example.

Fixes angular#31663
@vinaycookscode
vinaycookscode force-pushed the docs/datepicker-comparison-colors branch from f44d31b to a7bf4dc Compare November 6, 2026 19:45

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation area: material/datepicker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Datepicker comparison ranges uses substandard colors

1 participant