Date_select Ruby

How to extend date_select range in Ruby ?

This is only until 2005, and I would like to use it for the date of birth.

+5
source share
2 answers

You can use the option :start_year, see the documentation .

+17
source
<%= f.date_select :exp_date, :start_year=>2000,:end_year=>2030 %>

will be displayed 2000 to 2030 years..

If you want more, you can change :start_year and :end_year values.

+5
source

All Articles