Default Date Picker - Minimum Age

Hello everyone!

Happy Thursday (happy Friday to others!)

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.

Many thanks!

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

Worked like a charm! Except I did it in the Minimum Date Property (which I assume is what you meant! :slight_smile: )

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 :slight_smile:


Screenshot 2024-08-18 at 10.40.10 AM

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.

Okay now I see what you mean - my genuine apologies!! My brain saw it correct, but I changed it to try and you’re 1000000% right

This topic was automatically closed after 70 days. New replies are no longer allowed.