I am using two-way binding in my template driven form:
ts:
searchLeaveApplication: any = {};
html:
<mat-form-field class="searchInputs">
<input
matInput
[matDatepicker]="searchStartDate"
[(ngModel)]="this.searchLeaveApplication.startDate"
name="startDate"
/>
<mat-datepicker-toggle
matSuffix
[for]="searchStartDate"
></mat-datepicker-toggle>
<mat-datepicker #searchStartDate></mat-datepicker>
</mat-form-field>
However I am getting this as the date:
Which is not acceptable as a date format for the API (.Net core). How can I change to format to the proper date format? I suppose I am not able to use date pipes in two-way bindings.