Closed cmendla closed 7 years ago
Solved - Even though I required best_in_place.jquery-ui
in application.js, I also needed to add it to my application.html.erb as <%= javascript_include_tag "best_in_place.jquery-ui" %>
.
Now the date and select fields are working as expected.
I have best in place working for regular input fields. However, I can't seem to get it to work with a date field.
Fields such as
<%= best_in_place bedsheet_line, :sales_order, :class => "input_field", :html_attrs => {style: "width: 125px"} %>
work perfectly.The field I can't get to work (ie click on it and no reaction)
The view code is
<%= best_in_place bedsheet_line, :start_time, :as => :date %>
I have what I thought I needed to initialize the datepicker above the field in the view as
in my application.html.erb, I have
If I inspect the page and look at the console, I see a number of errors that appear when I try to use the date field
I tried calling the jquery datepicker without going through best in place and it works.
I put
<p>Date: <input type="text" id="dp" onclick="$('#dp').datepicker();$('#dp').datepicker('show');"></p>
in my view.The result is that a field appears and clicking on it caused the datepicker calendar to pop up.
So, the jQuery datepicker works outside of best in place. My problem is that I need it to work with the best in place date field.