Datepicker not showing up sometimes.
Closed this issue · 1 comments
alator21 commented
Datepicker works sometimes and sometimes dont.
<div class="form-group">
<label >Date:</label>
<%= f.text_field(:date, class: "datepicker form-control") %>
</div>
I got a function to change some other field according to the value of the datepicker
$(document).ready(function(){
$('.datepicker').datepicker();
//...
//.....
$(document).on('change','.datepicker',function(){
//.....
})
})
When i click on the field for the first time everything works OK.the panel is showing up and i choose the date.Then when i submit my form and come to create a new object ,i click on the text field and nothing showing up.If i refresh at this point everything works again etc. Any clues?
Nerian commented
Did you figure this out? It may be related to Turbolinks, if you are using it.