I can't seem to pass a date from a mat-option choice as it returns undefined when I try to log the event in the click method. How can I solve this issue?
HTML
<mat-drawer-content class="Font">
<mat-form-field appearance="fill">
<mat-label>choose the date
</mat-label>
<mat-select [(value)]="selected">
<mat-option value="option1" (click)="onclick($event)">{{this.shareDate.newCurrentDate}}</mat-option>
<mat-option value="option2" (click)="onclick($event)">{{this.shareDate.newTomorrow}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field >
<mat-label>choose the time
</mat-label>
<mat-select #hasBackdrop>
<mat-option [value]="false" *ngFor="let time of dayaHours">
<div class="hourTime">{{formatTime(time.time)}}</div>
</mat-option>
</mat-select>
</mat-form-field>
</mat-drawer-content>
</mat-drawer-container>
TS
onclick(event) {
console.log(event.value); // undefined
}