I am using following code for displaying date picker
In your component.html, use two inputs, first one to hold date from mat-datepicker, second one bind with model. In (selectedChanged) event of the 'mat-datepicker' update 'myModel.MyDateString' from the date-picker value:
Inside your component.ts:
updateDateToString(event) {
let newDate = new Date(event)
let dd: number | string = newDate.getDate();
if (dd < 10) {
dd = '0' + dd;
}
let mm: number | string = newDate.getMonth() + 1;
if (mm < 10) {
mm = '0' + mm;
}
const yy: number = newDate.getFullYear();
this.myModel.MyDateString = `${yy}-${mm}-${dd}`;
}