Issue
I have a ion-datetime set up in my angular project like below.
html -
<ion-datetime clearInput presentation="date" preferWheel="false" max="2100"
formControlName="example" minuteValues="0,10,20,30,40,50" slot="content"
[multiple]="true" (ionChange)="dateTimeUpdated($event)">
</ion-datetime>
typescript -
dateTimeUpdated($event){
console.log($event);
}
Supposedly, every time I change the value in the year-month-wheel, the ionChange should be triggered to return a new date time.
But reality is that it doesn’t call again after it is triggered for the first time. Even I spin or click the year-month-wheel multiple times again.
On the other hands, day works differently, you constantly get a response everytime you click it.
Anyone has the same issue or is it just me?3
**Just want to add that multiple=true seems to be the root of the problem. I tried the ion-dateTime without the multiple=true property. Works fine.
Solution
Updates to ionic v7 solved the issue of not emitting any value.
But instead it emits new value each time user change month or year, even though user haven't click on a day yet.
This day range issue is well known from ionic since 2021. https://github.com/ionic-team/ionic-framework/issues/23572
Answered By - AkiZukiLenn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.