Initializes the weekdays.
()
| 501 | |
| 502 | /** Initializes the weekdays. */ |
| 503 | private _initWeekdays() { |
| 504 | const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek(); |
| 505 | const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow'); |
| 506 | const longWeekdays = this._dateAdapter.getDayOfWeekNames('long'); |
| 507 | |
| 508 | // Rotate the labels for days of the week based on the configured first day of the week. |
| 509 | const weekdays = longWeekdays.map((long, i) => { |
| 510 | return {long, narrow: narrowWeekdays[i], id: uniqueIdCounter++}; |
| 511 | }); |
| 512 | this._weekdays.set(weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek))); |
| 513 | } |
| 514 | |
| 515 | /** Creates MatCalendarCells for the dates in this month. */ |
| 516 | private _createWeekCells() { |
no test coverage detected