i trying set current date start date of datetime in ionic2. user should not able select yesterday or previous date.
this code.
<ion-datetime class="date-input-box" min ="2017-04-05" displayformat="mm/dd/yy" pickerformat="mmm dd yyyy" [(ngmodel)]="event.date"(ionchange)="timechange()">
i have seen plunker in ionic1. works fine. want in ionic2
http://embed.plnkr.co/mienslytrssicrox6qsh/preview
this same thing requirement.but in angular1.
i have tried
https://forum.ionicframework.com/t/ionic-2-date-picker-min-max-date/74492
it working fine.
play with plunker
.html
<ion-item> <ion-label>date</ion-label> <ion-datetime displayformat="mm/dd/yy" pickerformat="mmm dd yyyy" min="2017-04-05" max="2020-10-31" [(ngmodel)]="mydate"> </ion-datetime> </ion-item>
.ts
mydate="2017-04-05t17:48:20.084z";
Comments
Post a Comment