title: Is there a way to know that mat-datepicker popup was closed because date was clicked
body: <p>I'd like to perform some actions when mat-datepicker popup closes but only if user clicked on a date (action should not trigger if popup was closed by escape key or backdrop click).</p>
  
  <p>I know there is a <code>@Output('closed') closedStream: EventEmitter&lt;void&gt;</code> but that is triggered every time popup is closed. 
  My idea was to detect if there is a dateChange event between opened and closed events but that does not work if the user clicks on the already selected date.</p>
  
  <p>I tried to fix that with custom DateAdapter (overriding <code>sameDate</code> or <code>compareDate</code> method to return that selected date is always different then currently selected one) but it seems that <code>mat-month-view</code> component is not using DateAdapter for comparing dates before emitting selection change:</p>
  
  <pre><code>_dateSelected(date: number) {
      if (this._selectedDate != date) {
        const selectedYear = this._dateAdapter.getYear(this.activeDate);
        const selectedMonth = this._dateAdapter.getMonth(this.activeDate);
        const selectedDate = this._dateAdapter.createDate(selectedYear, selectedMonth, date);
  
        this.selectedChange.emit(selectedDate);
      }
  
      this._userSelection.emit();
  }
  </code></pre>
  
  <p>Not sure if this in itself is a bug or not...</p>
  
  <p>Does anybody know a simpler way to know if material datepicker popup was closed due to date selection? Am i missing something obvious?</p>
  
  <p>Thanks!</p>