Open Sireini opened 5 years ago
It seems like the Release Candidate version changed the output event to change
instead of onChange
. Try using this:
<ion-calendar [(ngModel)]="date"
(change)="onChange($event)"
[format]="'YYYY-MM-DD'">
Change the docs please, I spend 1 hour debugging this.
the npm package's readme has old documentation info for this event https://www.npmjs.com/package/ion2-calendar
Ionic version: (check one with "x") [ ] 2.x [ ] 3.x [x ] 4.x
Ion2-calendar mode: (check one with "x") [ x] components mode [ ] modal mode
I'm submitting a ... (check one with "x") [x ] bug report [ ] feature request [ ] help me
Current behavior:
onChange event is not getting triggert.
Expected behavior:
When changing a date I expect the onChange to fire.
Related code:
`<ion-calendar [(ngModel)]="date" (onChange)="onChange($event)" [format]="'YYYY-MM-DD'">
onChange(date) { console.log(date); this.getAvailability(date); }`