In form 1, I have a formtasticdate_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 displayed, the yeardefault value of 1950 is used in the drop-down list .
In form 2, I have another formtasticdate_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 displayed, the yeardefault value of 2000 is used in the drop-down list .
How do you explain this behavior? Ideally, I want the default year field to be 10 years ago.
PS: Setting a default does not matter.
:default => Date.today
source
share