Creates an MatCalendarCell for the given month.
(month: number, monthName: string)
| 350 | |
| 351 | /** Creates an MatCalendarCell for the given month. */ |
| 352 | private _createCellForMonth(month: number, monthName: string) { |
| 353 | const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1); |
| 354 | const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.monthYearA11yLabel); |
| 355 | const cellClasses = this.dateClass ? this.dateClass(date, 'year') : undefined; |
| 356 | |
| 357 | return new MatCalendarCell( |
| 358 | month, |
| 359 | monthName.toLocaleUpperCase(), |
| 360 | ariaLabel, |
| 361 | this._shouldEnableMonth(month), |
| 362 | cellClasses, |
| 363 | ); |
| 364 | } |
| 365 | |
| 366 | /** Whether the given month is enabled. */ |
| 367 | private _shouldEnableMonth(month: number) { |
no test coverage detected