I\'m using a date picker from angular material. I want to set a default value but it is not showing the value.
In a group of form controllers, you can use the default date as seen in follows.
birthdayCtrl: ['1999-01-31']
Using Template driven approach the solution is as followed.
selectedDate = new Date();
<input class="form-control"
matInput
[matDatepicker]="dp3"
[min]="today"
[max]="max"
disabled
[(ngModel)]="selectedDate"
(ngModelChange)="dateUpdated()"
name="currentDate"
/>
<mat-datepicker-toggle
matSuffix
[for]="dp3"
></mat-datepicker-toggle>
<mat-datepicker #dp3 disabled="false"></mat-datepicker> ```