Consider updated Date Selection in Schedule History #103
@ -3,7 +3,7 @@
|
||||
|
||||
<mat-form-field class="long-form">
|
||||
<mat-label>Choose a date</mat-label>
|
||||
<input matInput [matDatepicker]="picker" [(ngModel)]="selectedDate">
|
||||
<input matInput [matDatepicker]="picker" [(ngModel)]="selectedDate" (ngModelChange)="onUpdateSelectedDate()">
|
||||
<mat-hint>MM/DD/YYYY</mat-hint>
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
|
@ -59,4 +59,12 @@ export class ScheduleHistoryComponent implements OnInit{
|
||||
|
||||
return duration.asMinutes() + " Minutes";
|
||||
}
|
||||
|
||||
onUpdateSelectedDate() {
|
||||
this.historyService.historySchedulesDateGet(moment(this.selectedDate).format("YYYY-MM-DD")).subscribe({
|
||||
next: resp => {
|
||||
this.schedules = resp;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user