How to set the default date of ion-datetime is today Ionic-v2

you can do something like this. initialize new date in your component then use binding.

 myDate: String = new Date().toISOString();

<button> today date <ion-datetime displayFormat="YYYY-MM-DD" [(ngModel)]="myDate" (ionChange) = "mydate(myDate)"> </ion-datetime></button>

 mydate(event){
    //do something here
  }
2 Likes