rails semantic ui jquery not updating field -


i've run strange problem can't date picker update field in rails app. i've tried few different date pickers, it's not problem jquery plugin. same results.

there's nothing strange i'm trying do.

<div class="datepicker field">   <label>date of birth</label>   <%= f.text_field :dob %> </div> 

i have tried both manual turbolinks workarounds..

var ready; ready = function() { .... in here } $(document).ready(ready); $(document).on('page:load', ready); 

and jquery-turbolinks gem. gives me same result - jquery load picker, field not updated.

i believe i've got narrowed down semantic ui @ point, i'm happy proven wrong.

application.js :

//= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require semantic-ui //= require pickadate/picker  //= require pickadate/picker.date  //= require turbolinks //= require_tree . 

relevant portion of local js:

$(function() {   $('.datepicker').pickadate() }); 

any clues i'm missing? thanks.

as always, figure out problem 10 seconds after posting question.

the answer attach jquery right on text_field, thusly:

<div class="field" >   <label>date of birth</label>   <%= f.text_field :dob, id: "datepicker" %> </div> 

joy.


Popular posts from this blog