I am wanting to know how I can use the default Date Picker and set a condition or minimum date allowed to select. I see the options, but I want it to always ensure that from the day someone uses it that it doesnt allow the age to be younger than 18 years old.
I am working on a platform for a beer company and our age is 18 years old.
I think having a condition is better where it will become red and show a message if the age is under 18years old.
Not sure if it can be done by date picker. We have done it with a workflow. Split date in year, month, date and first check of year is 18 years ago, next check months and last date.
You can utilize this expression in a Date/Time Picker’s maximum date property or as part of an expression in a condition. Current date/time+ years: -18
If the Date/Time Picker is for the user to select their birthday, then I think you need the expression in the maximum date property because you want to preclude selection of any date later than 18 years ago.
Totally get what you’re saying but it seems the minimum works the best. Because I want anyone who is 18 of age or older to enter the sight, and the selection works just like that when setting the minimum with your expression
Your screenshot shows that it’s only possible to select a date less than 18 years ago. If that’s what you need, then great. If you need the user to be able to select a date more than 18 years ago, move the expression the maximum date property.