Skip to content

Commit 8df7006

Browse files
wnvkojelbourn
authored andcommitted
fix(matCalendar): make cell content button, #16356
1 parent 738f10c commit 8df7006

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/material/datepicker/calendar-body.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@
4141
[style.width]="_cellWidth"
4242
[style.paddingTop]="_cellPadding"
4343
[style.paddingBottom]="_cellPadding">
44-
<div class="mat-calendar-body-cell-content"
45-
[class.mat-calendar-body-selected]="selectedValue === item.value"
46-
[class.mat-calendar-body-today]="todayValue === item.value">
47-
{{item.displayValue}}
48-
</div>
44+
<button class="mat-calendar-body-cell-content"
45+
mat-button
46+
[class.mat-calendar-body-selected]="selectedValue === item.value"
47+
[class.mat-calendar-body-today]="todayValue === item.value">
48+
{{item.displayValue}}
49+
</button>
4950
</td>
5051
</tr>

src/material/datepicker/calendar-body.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ $mat-calendar-body-cell-content-size: 100% - $mat-calendar-body-cell-content-mar
6161
// Choosing a value clearly larger than the height ensures we get the correct capsule shape.
6262
border-radius: 999px;
6363

64+
// Override mat-button defaults
65+
min-width: initial;
66+
border-color: transparent;
67+
6468
@include cdk-high-contrast {
6569
border: none;
6670
}

0 commit comments

Comments
 (0)