My form page (HTML) needs user's DOB. And the format is: dd-mm-yyyy and the data type is in text. e.g. April 21st, 1990 is 21-04-1990. My assignment requires that user has to be older than 18 but cannot older be than 80.
My Javascript needs to read user's input and calculate current date minus user's input to check if age qualifies.
I expect the output of DOB to allow or restrict the form's page.
Age = Current Date - User's DOB If 18 or older go to the next page, deny if less than 18. If 80 or older, cannot advance to next page.