Skip to content

bug(mat-datepicker): overrides mixin not working for period button #33968

Open

Description

@rachelhoffmanapree

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Mixin does not properly apply the following properties:
calendar-period-button-text-size
calendar-period-button-text-weight

The .mat-mdc-button class takes precedence over the .mat-calendar-period-button class and is not using the calendar-period variables

Reproduction

StackBlitz link:
https://stackblitz.com/edit/xrfsawq4?file=src%2Fexample%2Fdate-range-picker-overview-example.ts,src%2Fstyles.scss&startScript=start

Image

Steps to reproduce:

  1. Click the calendar toggle button to open the datepicker
  2. See that the color is correctly getting applied but the size and weight are not properly getting applied

Expected Behavior

The mixin should set the size and weight of the period button

Actual Behavior

The mixin does not set the size and weight of the period button

Environment

  • Angular: 21.2.14
  • CDK/Material: 21.2.14
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS Tahoe 26.7.1

Activity

  1. lazerg commented on Oct 17, 2026

    @lazerg
    Contributor

    It is a bug. The color works because the datepicker sets it through the button's CSS variable. Size and weight are set directly, with the same specificity as .mat-mdc-button, so load order decides who wins (calendar.scss). Until there is a fix, you can set them through the button tokens:

    .mat-calendar-period-button {
      @include mat.button-overrides((
        text-label-text-size: 20px,
        text-label-text-weight: 700,
      ));
    }
  2. self-assigned this
    on Oct 17, 2026
  3. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    and removed
    needs triageThis issue needs to be triaged by the team
    gemini-triagedLabel noting that an issue has been triaged by gemini
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions