Ion-datetime don't work (ionic2 , Typescript)


#1

Hello everyone, I’m trying to use ion-datetime and it shows me this error:

NewChallange.html

       <ion-item>
           <ion-label>Start Date</ion-label>
           <ion-datetime displayFormat="MMM DD YYYY" [(ngModel)]="event.month">
            </ion-datetime>
        </ion-item>

NewChallange.ts

// ...
// ...
    export class NewChallange{
            public event = {
                   month: '1990-02-19',
                   timeStarts: '07:43',
                   timeEnds: '1990-02-20'
             }
       constructor(){ 
        // ....
       }
    }

#2

I tried your code and it’s working fine on my end. Maybe there something more in your NewChallenge.ts that breaks your code.