0

I need to call a function upon clicking a date in mat-datepicker. dateChange only calls a function if the selected date is changed. I need that function to be called if i click on the same date which is previously set. Is there any method to handle this ?

Vishnu .T.D
  • 43
  • 1
  • 10

1 Answers1

1

you can always use the "closed" event of the mat-date-picker

  <input #input matInput [matDatepicker]="picker">
  <mat-hint>MM/DD/YYYY</mat-hint>
  <mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle> 
  <mat-datepicker #picker (closed)="emit(input)"></mat-datepicker>
Eliseo
  • 50,109
  • 4
  • 29
  • 67