samedi 27 juin 2015

How can I get the updated date from a bootstrap datetimepicker with the datetimepicker-rails gem

How can I get the value of the <input class="date_picker" ... when the <div class="bootstrap-datetimepicker-widget" ... is changed or updated? I need to get the value so I can update other attributes on the same page. Here is my best attempt to react to the 'changeDate' event:

$('.datetimepicker').datetimepicker().on('changeDate', function(ev){
    console.log(' date changed '+ ev.date); 
});

I'm unable to get any response form this event. I also opened an issue with @zpaulovics's gem but I'm not sure if this is a defect, or if I am not accessing the event correctly.

Aucun commentaire:

Enregistrer un commentaire