if you check the below link, when you try to change the first DateTime the second one also gets changed.
Plunker link
Times = ["11:00", "11:00", "11:00", "11:00"];
<ion-list>
<ion-item *ngFor="let Time of Times; let i=index">
<!-- label displays correct value -->
<ion-label>Actual value {{ Times[i] }}</ion-label>
<!-- ion-datetime displays wrong value -->
<ion-datetime [(ngModel)]="Times[i]" displayFormat="h:mm A"></ion-datetime>
</ion-item>
</ion-list> indent preformatted text by 4 spaces
Seems to be an issue with the ngModel if i replace with <ion-datetime [(ngModel)]="Time.selectedTime" displayFormat="h:mm A"></ion-datetime>
it seems to work fine
@cooLLedge Thanks for the workaround. If you can see label can able to reflect the changes correctly. I guess it must be the problem with DateTime change detection.
But only the date is showing up. Without the the names are showing, but with it, the names seems to be blocked and only the dates are showing.
What can I do to show my datestring in the right format?
for my formatting the angular {{ item.datum | date:'dd.MM.yy' }}
is just working
but now its the problem that angular adjusts the local timezone by itsels, instead of taking the datestring plain like does
Whenever anybody has a problem with the datetime component, the very first thing they should check is “am I initializing its bound property with a valid ISO8601 string?”. If not, do so. Even if you don’t really want to; see if it affects your situation. I have seen all sorts of weirdness with ion-datetime get solved with this simple step.