MCPcopy Create free account
hub / github.com/angular/components / _setSelectedMonth

Method _setSelectedMonth

src/material/datepicker/year-view.ts:435–443  ·  view source on GitHub ↗

Sets the currently-selected month based on a model value.

(value: DateRange<D> | D | null)

Source from the content-addressed store, hash-verified

433
434 /** Sets the currently-selected month based on a model value. */
435 private _setSelectedMonth(value: DateRange<D> | D | null) {
436 if (value instanceof DateRange) {
437 this._selectedMonth.set(
438 this._getMonthInCurrentYear(value.start) || this._getMonthInCurrentYear(value.end),
439 );
440 } else {
441 this._selectedMonth.set(this._getMonthInCurrentYear(value));
442 }
443 }
444}

Callers 2

selectedMethod · 0.95
_initMethod · 0.95

Calls 2

setMethod · 0.80

Tested by

no test coverage detected