I had an input box type data and a datapicker. I wanted to have both with the same date object because if you modify one the other should update the data, but it was not working: I had this:
<input style="width: 150px;" [(ngModel)]="currentDateFrom" type="date" pattern="\d\d\/\d\d\/\d\d\d\d">
<button (click)="hideDateFrom = !hideDateFrom;">Select</button>
<datepicker [hidden]="hideDateFrom" [(ngModel)]="currentDateFrom" [minDate]="minDate" [showWeeks]="true"></datepicker>
But first, the input box didn't take the date when renderer, second when you modified input, datepicker didn't update and viceversa.
So I tried to change the input type to "text". In that way, it took the data when renderer. But you can't do the ngModel bidirectional (as is string type not date anymore) you should instead have:
<input style="width: 150px;" [ngModel]="currentDateFrom | date:'dd/MM/y'" (ngModelChange)="onChanges($event)" type="text" pattern="\d\d\/\d\d\/\d\d\d\d" >
like in this example but the problem between input and datepicker still remains