* Takes the index of a calendar body cell wrapped in an event as argument. For the date that * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with * that date. * * This function is used to match each component's model of the active date with the
(event: MatCalendarUserEvent<number>)
| 201 | * updated value asynchronously via the `activeCell` Input. |
| 202 | */ |
| 203 | _updateActiveDate(event: MatCalendarUserEvent<number>) { |
| 204 | const month = event.value; |
| 205 | const oldActiveDate = this._activeDate; |
| 206 | |
| 207 | this.activeDate = this._getDateFromMonth(month); |
| 208 | |
| 209 | if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) { |
| 210 | this.activeDateChange.emit(this.activeDate); |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /** Handles keydown events on the calendar body when calendar is in year view. */ |
| 215 | _handleCalendarBodyKeydown(event: KeyboardEvent): void { |
nothing calls this directly
no test coverage detected