Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ion-datetetime min max values from function call as compared from a string value in the html? #6906

Closed
aslamj opened this issue Jun 14, 2016 · 3 comments

Comments

@aslamj
Copy link

aslamj commented Jun 14, 2016

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?

@brandyscarney
Copy link
Member

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!

@aslamj
Copy link
Author

aslamj commented Jun 14, 2016

Thanks, can we also restrict the time or only date value?

@brandyscarney
Copy link
Member

Right now only the date, but there is an open issue to include time: #6850

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants