ion-datetime
is bound to the variable this.days[index].hm
when below function is called ion-datetime
does not show the user’s new datetime value in the view.
Method:
changeDateTimeValueFromCode(index: number) {
this.days[index].hm = '15'+ ':' + '20';
}
}
View: new value for day.hm
not displayed
<ion-card *ngFor="let day of days">
<ion-item>
<ion-label>Time worked hours/min</ion-label>
<ion-datetime displayFormat="H:mm" (ionChange)="TestUserChange(day.index)" [(ngModel)]="day.hm"></ion-datetime>
</ion-item>
</ion-card>