zpaulovics / datetimepicker-rails

A date and time picker for Twitter Bootstrap in Rails using Simple Form
MIT License
174 stars 80 forks source link

'changeDate' Javascript event not firing #58

Closed spencerdcarlson closed 9 years ago

spencerdcarlson commented 9 years ago

I can't seem to view the 'changeDate' event being called. Does this gem alter the event binding? I'm trying to get the date via Javascript to update other attributes on the page.

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

spencerdcarlson commented 9 years ago

Realized its using the 'dp.change' event per the bootstrap documentation $('.datetimepicker').datetimepicker().on('dp.change', function(ev){ console.log('date changed: '+ ev.date); });