Hi to everyone,
my goal is simply an automatic copy of a date value from a ion-datetime to an other ion-datetime.
This is what i’m doing:
.html
<ion-item>
<ion-datetime name="dsi" [(ngModel)]="dsival" (ionChange)="changedsi($event)"></ion-datetime>
</ion-item>
<ion-item>
<ion-datetime name="dsiv" [(ngModel)]="mygoal"></ion-datetime>
</ion-item>
.ts
changedsi(data) {
//this.mygoal= '2016-05-26T09:16:57.528Z'; //this works
this.mygoal= data; //this doesn't work (i.e. nothing changed)
//this.mygoal= data.toISOString(); //this gives error
//this.mygoal= data.toString(); //this gives error
}
What i’m doing wrong?
Thank you