this code snippet is from my component.ts file
resetFilters() {
this.date = 0;
this.query.startedAt= null;
this.query.endedAt=null;
this.searchTerm = '';
this.route.params.subscribe((params) => {
this.machineId = Number(params['id']);
this.machinesService.getItem(this.machineId).subscribe((response) => {
this.machineDetails.MachineChanges = response.MachineChanges;
});
});
}
this snippet is from my component.html file
<volante-slottrak-ui-custom-datepicker class="custom-date mb-2" [placeholder]="'Start Date'"
[model]="query.startedAt" (modelOutput)="onStartDateChange($event)">
</volante-slottrak-ui-custom-datepicker>
<volante-slottrak-ui-custom-datepicker id="test"class="custom-date mb-2" [placeholder]="'End Date'"
[model]="query.endedAt" (modelOutput)="onEndDateChange($event)">
</volante-slottrak-ui-custom-datepicker>.
<button (click)="resetFilters()" class="reset-filters-btn m-r-10 mb-2" id="resetFiltersMealLog">
<span class="reset-filters-text">Reset All</span>
</button>