I am using the bootstrap date picker to enable selection of dates in a form using simple_form_for. For example
<%= f.input :payment_date, as: :string, input_html: { class: "datepicker" } %>
My date picker uses the format of dd-mm-yyyy
I would like to set today's date as the default value in the form using simple_form_for, any ideas on how I can do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…