ruby on rails - Postgresql change the year range and input order -
i have date_of_birth
field type date
, need correct following 2 issues:
- the year range limiting 2010..2020
- the order of fields yyyy - mm - dd , mm - dd - yyyy
i able desired output follows (strictly simple_form):
<%= f.input(:date_of_birth, start_year: 1900, end_year: time.now.year - 1, order: [:month, :day, :year]) %>
Comments
Post a Comment