Skip to content

Commit 40589ba

Browse files
committed
fix(material/datepicker): resolve repeater warnings in calendar
Fixes that the calendar was triggering some newly-introduced warnings from the framework. Fixes #29008.
1 parent 01540bb commit 40589ba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/material/datepicker/calendar-body.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515

1616
<!-- Create the first row separately so we can include a special spacer cell. -->
17-
@for (row of rows; track row; let rowIndex = $index) {
17+
@for (row of rows; track rowIndex; let rowIndex = $index) {
1818
<tr role="row">
1919
<!--
2020
This cell is purely decorative, but we can't put `aria-hidden` or `role="presentation"` on it,
@@ -36,7 +36,7 @@
3636
cell is interactable, as well as the selection state via `aria-pressed`. See #23476 for
3737
background.
3838
-->
39-
@for (item of row; track item; let colIndex = $index) {
39+
@for (item of row; track colIndex; let colIndex = $index) {
4040
<td
4141
role="gridcell"
4242
class="mat-calendar-body-cell-container"

src/material/datepicker/month-view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<table class="mat-calendar-table" role="grid">
22
<thead class="mat-calendar-table-header">
33
<tr>
4-
@for (day of _weekdays; track day) {
4+
@for (day of _weekdays; track $index) {
55
<th scope="col">
66
<span class="cdk-visually-hidden">{{day.long}}</span>
77
<span aria-hidden="true">{{day.narrow}}</span>

0 commit comments

Comments
 (0)