Hi im using ruby on rails, when i enter the date of birth on the years is just giving me from 2007 to 2012,
i have this command on my _form,html.erb (this is on the views), When im editing a client is when i want to ge the day of birth is just giving me 2007 to 2012.
<div class="field">
<%= f.label "Fecha de nacimiento:" %>
<%= f.date_select :fecha_nacimiento %>
</div>
You can use params to specify
start_yearandend_yearof your select. Example:Look at
:end_year, I usedTime.now.year - 10because I assumed that the minimum age to register is 10 years old.Boa sorte =]
Reference: http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-date_select