How to set the default date of ion-datetime is today and disable the days passed Ionic-v2 . Thanks for reading!
What does that mean?
Think he means setting the minimum date to todays date.
this.startDate = new Date().toISOString();
this.minDate = new Date().toISOString();
and in the html
<ion-datetime
displayFormat="MMM DD, YYYY HH:mm"
[min]="minDate"
[(ngModel)]="startDate"
>
</ion-datetime>
3 Likes
new Date().toISOString() changes date to me.
the output of,
new Date() = Thu Sep 13 2018 12:08:03 GMT+0530 (India Standard Time) and,
new Date().toISOString() = 2018-09-13T06:38:03.287Z.
can you please help @kgaspar ?