I am having problems with date_select.
This is what I have:
<%= date_select("user", "birthdate", :start_year =>
1920, :end_year
=> Date.today.year - 17, :include_blank => "true") %>
Once it is submitted I want to make sure that a birthdate exists and
that the person is at least 18 years old. When a user selects a
month and not a year and date an error occurs. Anyone have any
solutions they implemented for this?
The problem with using:
18.years.ago.to_date # I think this was this?
Is that it does not take into consideration leap years... which
causes problems.
Thanks for your insight!
John