Angular setting default value of HTML datepicker
angular, binding, date, datetime, html
Solution
Plunker - https://plnkr.co/edit/s5OMg2olU2yHI246nJOG?p=preview
<input type="date" [ngModel] ="dt | date:'yyyy-MM-dd'" (ngModelChange)="dt = $event">
Problem
The [(ngModel)] is not setting default value for date picker. I have tried various different ways to populate the date picker but have been unable to. My HTML ``` <input id="START_DATE" type="datetime-local" [(ngModel)]="startDate"/> ``` In that example the binding works but I am unable to set the default value. I can set the value if i just interpolate the value but then i lose my 2 way binding. value="{{startDate}}"