On form 1, I have a formtastic
date_select field.
= f.input :date_from, :discard_day => true,
:discard_month => true,
:order => [:year],
:start_year => 1950,
:end_year => Date.today.year,
:include_blank => false
When the form is rendered, the year
drop down box defaults to 1950.
On form 2, I have another formtastic
date_select field.
= f.input :date_from, :discard_day => true,
:order => [:month, :year],
:start_year => 1950,
:end_year => Date.today.year,
:include_blank => false
When the form is rendered, the year
drop down box defaults to 2000.
How do you explain this behavior? Ideally, I want the year field to default to 10 years ago
.
P.S: Setting default value made no difference.
:default => Date.today