I am trying to get a date stored in Firebase as an ISO string and display it in where it can be seen and also updated. I cannot however display the date in through ngModel. I was planning to use ionChange to update the value in Firebase and use {{ settings?.alarmOn }} as a way to display it but this does not work either, despite checking that “settings?.alarmOn” does contain the date.
This is what I have currently, in case I have made a simple mistake somewhere.
<ion-item>
<ion-label>From</ion-label>
<ion-datetime displayFormat="h:mm A" pickerFormat="h mm A">{{ settings?.alarmOn }}</ion-datetime>
</ion-item>
And in my .ts file…
this.getSettings().on('value', snapshot => {
this.settings = snapshot.val();
}
Any help?