rd-dev-ukraine / angular-io-datepicker

MIT License
21 stars 18 forks source link

Datepicker Input field doesn't get updated after model value changes in ts file #29

Open abhiyg opened 7 years ago

abhiyg commented 7 years ago

I have bound the date picker as follows: HTML: <date-picker [(ngModel)]="data.myDate" [showClearButton]="false" format="L" ngDefaultControl>

<button (click)="changeDate()"> TS: onInit() { this.data.myDate='01/01/201701'; } changeDate() { this.data.myDate=null; }

So on when the view loads, the data on date picker is '01/01/2017' , but on click of changeDate function, the view doesn't get updated.