I have a date picker, i want to user cannot pick a date but date now minus this date less than 18 year(i don't want the user less than 18 years old).but i don't know how to do that.
i described my idea by this code below.
const nowDate = new Date()
const valueCondition = 18
const dateWishes = nowDate - valueCondition
how can i do that?
have a nice day, everyone!