How do I dynamically set the min max datetime values (including date and time values). I'm hoping the ion-datetime to call in a function, which returns the acceptable time value as a string.
Can this be done in beta.8 or future versions?
You can use property binding to bind the min/max to an expression. Something like this:
<ion-datetime [min]="myMinDate" [max]="myMaxDate"></ion-datetime>
See the Angular property binding documentation for more info: https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding
Thanks!
Thanks, can we also restrict the time or only date value?
Right now only the date, but there is an open issue to include time: https://github.com/driftyco/ionic/issues/6850
Most helpful comment
You can use property binding to bind the min/max to an expression. Something like this:
See the Angular property binding documentation for more info: https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding
Thanks!