MCPcopy
hub / github.com/angular/components / open

Function open

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

Open the calendar.

()

Source from the content-addressed store, hash-verified

642
643 /** Open the calendar. */
644 open(): void {
645 // Skip reopening if there's an in-progress animation to avoid overlapping
646 // sequences which can cause "changed after checked" errors. See #25837.
647 if (this._opened || this.disabled || this._componentRef?.instance._isAnimating) {
648 return;
649 }
650
651 if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
652 throw Error('Attempted to open an MatDatepicker with no associated input.');
653 }
654
655 this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();
656 this._openOverlay();
657 this._opened = true;
658 this.openedStream.emit();
659 }
660
661 /** Close the calendar. */
662 close(): void {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…