html:
<mat-form-field>
<input matInput [matDatepicker]="picker1" placeholder="From date: mm/dd/yyyy" name="from_date"
[(ngModel)]="callListRequestOb.from_date" maxlength="150">
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
In method:
this.callListRequestOb.from_date = new Date(this.callListRequestOb.from_date).toISOString().slice(0, 10);
When I select a date in datepicker it selects the date fine. But when I click the search button(I don't include it) the select time shows a behind date. I'm working on Angular 9. How do I solve this issue?