Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lib/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ export class MatDatepicker<D> implements OnDestroy {
*/
@Input() touchUi = false;

/** Event emitted when the datepicker has been opened. */
@Output() onOpen: EventEmitter<void> = new EventEmitter<void>();

/** Event emitted when the datepicker has been closed. */
@Output() onClose: EventEmitter<void> = new EventEmitter<void>();

/** Whether the datepicker pop-up should be disabled. */
@Input()
get disabled() {
Expand Down Expand Up @@ -271,6 +277,7 @@ export class MatDatepicker<D> implements OnDestroy {

this.touchUi ? this._openAsDialog() : this._openAsPopup();
this.opened = true;
this.onOpen.emit();
}

/** Close the calendar. */
Expand All @@ -296,6 +303,7 @@ export class MatDatepicker<D> implements OnDestroy {
}

this.opened = false;
this.onClose.emit();
}

/** Open the calendar as a dialog. */
Expand Down