I have this bit of code:
= f.date_select :dateofbirth, :start_year => Date.current.year, :end_year => 1930, :html=>{:class => "choose_dateofbirth"}
where I'd like to set a class to the year select only, can that be done and if so - how?
Note that at current state it doesn't set any class to any select field.
this should work
= f.date_select :dateofbirth, {:start_year => Date.current.year, :end_year => 1930}, {class: "choose_dateofbirth"}
docs
date_select(object_name, method, options = {}, html_options = {})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With