'Angular Material datepicker does not return value when action button is in use

  1. The problem is that when clicking today-button, it is working, but when changing the date in datepicker, nothing happens and this seems to be because action button is in use. How today-button is doable without action button?

  2. If I add touchUi mode true, today-button disappears.

     <mat-form-field class="toolbar-button-calendar-picker">
       <input matInput [matDatepicker]="picker" #selDate (dateInput)="onDateChange($event.value)">
       <mat-datepicker class="date-picker" touchUi #picker>
         <mat-datepicker-actions>
             <button mat-raised-button color="primary"
               (click)="clickToDay.emit()"
               matDatepickerApply>
               {{ "today" | translate }}
             </button>
           </mat-datepicker-actions>
       </mat-datepicker>
     </mat-form-field>
    

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source