Reputation: 363
I have an ionic date-time. It's working, but it only goes up to this year and backward.
What I want is to go from this year and forward. Is it possible?
<ion-item>
<ion-label>Event Date</ion-label>
<ion-datetime displayFormat="D MMM, YY" pickerFormat="DD MMM YYYY" [(ngModel)]="eventDate">
</ion-datetime>
Upvotes: 2
Views: 3008
Reputation: 24224
You can add the attribute max to ion-date like the following:
<ion-item>
<ion-label>Event Date</ion-label>
<ion-datetime min="2018" max="2099-10-31" displayFormat="D MMM, YY" pickerFormat="DD MMM YYYY" [(ngModel)]="eventDate">
</ion-datetime>
Upvotes: 5