kekeh / angular-mydatepicker

Angular datepicker and date range picker :date:
https://kekeh.github.io/angular-mydatepicker/
MIT License
1 stars 11 forks source link

Calendar not showing correctly with onPush change detection #13

Closed gentle9 closed 4 years ago

gentle9 commented 5 years ago

Hi, the Calendar doesn´t popup correctly when the component that contains the input component has set the changeDetection to onPush.

Here is a example where you can see the difference. https://stackblitz.com/edit/angular-emptyproject-8-pipe-y33hq2

tomdev9 commented 5 years ago

Hi @gentle9 , i have same problem and this is my workaround: call this.changeDetectorRef.detectChanges(); after dp.toggleCalendar();

Here is your example with this fix. https://stackblitz.com/edit/angular-emptyproject-8-pipe-mj1xuj

kekeh commented 4 years ago

Hello @gentle9 and @tomastalian

Here is working example: https://stackblitz.com/edit/angular-emptyproject-8-pipe-nxavs3?file=src%2Fapp%2Fcalendar.component.ts