Skip to content

Commit 5bd42ea

Browse files
authored
fix(material/datepicker): toggle button active color not showing up in M3 (#31565)
There were two issues preventing the active styles for the datepicker toggle from showing up in M3: 1. In M2 the inner button had a `color: inherit` which allowed it to inherit the color from the toggle, however in M3 the button has a specific color. 2. The M3 tokens for the datepicker weren't setting the right color.
1 parent 4ce794c commit 5bd42ea

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/material/datepicker/_m3-datepicker.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
datepicker-range-input-disabled-state-text-color:
5757
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
5858
datepicker-range-input-separator-color: map.get($system, on-surface),
59-
datepicker-toggle-active-state-icon-color: map.get($system, on-surface-variant),
59+
datepicker-toggle-active-state-icon-color: map.get($system, primary),
6060
datepicker-toggle-icon-color: map.get($system, on-surface-variant),
6161
),
6262
typography: (
@@ -71,7 +71,4 @@
7171
),
7272
density: (),
7373
);
74-
75-
$tokens: (
76-
);
7774
}

src/material/datepicker/datepicker-toggle.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ $fallbacks: m3-datepicker.get-tokens();
99
.mat-datepicker-toggle {
1010
pointer-events: auto;
1111
color: token-utils.slot(datepicker-toggle-icon-color, $fallbacks);
12+
13+
button {
14+
color: inherit;
15+
}
1216
}
1317

1418
.mat-datepicker-toggle-active {

0 commit comments

Comments
 (0)