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

Function registerInput

src/material/datepicker/datepicker-base.ts:610–618  ·  view source on GitHub ↗

* Register an input with this datepicker. * @param input The datepicker input to register with this datepicker. * @returns Selection model that the input should hook itself up to.

(input: C)

Source from the content-addressed store, hash-verified

608 * @returns Selection model that the input should hook itself up to.
609 */
610 registerInput(input: C): MatDateSelectionModel<S, D> {
611 if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
612 throw Error('A MatDatepicker can only be associated with a single input.');
613 }
614 this._inputStateChanges.unsubscribe();
615 this.datepickerInput = input;
616 this._inputStateChanges = input.stateChanges.subscribe(() => this.stateChanges.next(undefined));
617 return this._model;
618 }
619
620 /**
621 * Registers a portal containing action buttons with the datepicker.

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected