Open the calendar.
()
| 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 { |
nothing calls this directly
no test coverage detected
searching dependent graphs…