Rails 4 + simple_form and jQuery UI. Datepicker is not working via turbolinks

前端 未结 3 869
栀梦
栀梦 2020-12-31 13:01

I have this form which calls datepicker:

...
<%= f.input :expiration_date, as: :datepicker, required: false %>
...

Simple_form wrappe

3条回答
  •  无人及你
    2020-12-31 13:57

    The following works for me in simple_form and jquery-ui:

    js:

    $('input#date_field').datepicker();

    form:

    <%= f.text_field :expiration_date, :placeholder => 'Select Date' %>

    So without as: :datepicker.

提交回复
热议问题