I have a new page with simple_form_for elements as shown below
<%= simple_form_for @invoice, :html => { :class => 'form-horizontal' } do |f| %>
<%= render "shared/error_messages", :target => @invoice %>
<%= f.association :customer %>
<%= f.input :invoice_date, as: :string, input_html: { class: "datepicker"} %>
<% end %>
I am trying to incorporate calendar element into the form above, from the unicorm admin template theme. My Assets file contains bootstrap-datepicker.js which I am trying to incorporate in the form above. Whenever I add an extra HTML attribute to invoice_date input, I get a syntaxt error.
I tried this
<%= f.input :invoice_date, as: :string, input_html: { class: "datepicker", data-date-format="dd-mm-yyyy"} %>
Which yielded an error. How do i incorporate the calendar function to invoice_date above from bootstrap-datepicker.js in my template?