Date of Birth UI element in Ruby on Rails 3
I've used Ruby on Rails 3 to generate scaffolding for a model including Date of Birth as a date native type. However, the default UI element for the year only gives you the option of +- 5 years from the current year, meaning the range is limited to 2006-2016.
Is there an elegant w开发者_JAVA技巧ay to restrict this range to all years before the current year?
Is this what you are looking for?
<%= select_year(Date.today, :start_year => 1992, :end_year => 2011) %>
see this.
精彩评论