I would like to have an additional data attribute on an input tag generated by simple_form. The following does not work:
<%= f.input :date, :as => 'date_picker', :data => {:datepicker => :datepicker} %>
How could this be done? Is it possible at all? As you might have guessed: I am trying to add bootstrap-datepicker to my site without using explicit js to initialize the date picker.
The correct API is:
f.input :date, :as => 'date_picker', :input_html => { :data => {:datepicker => :datepicker} }
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