Age Verification Form - invalid date or time string
I have a form with Month + Day + Year drops downs.
User selects their DOB and if GTE 13 from NOW they're in.
Problem is if someone selects a date that doesn't exist like 9/31 CF
throws an error that I can't figure out how to
prevent - ""31/9/1976" is an invalid date or time string."
Client wants the individual drops downs. If I use a single box and
cfinputs with "date" validation it will catch these illegal dates.
Question is how can I catch them using 3 individual strings from my
m/d/y drop downs?
This is my code
<!--- Compile Form input --->
<cfset userDOB = "#form.day#/#form.month#/#form.year#">
<!--- Calculating age difference --->
<cfset userAge = datediff("yyyy",variables.userDOB, now())>