Closed losewin closed 4 years ago
Why is it not working? already tried the .on('datepicker-change') and .bind('datepicker-change') but still won't trigger
.on('datepicker-change')
.bind('datepicker-change')
var today=new Date() today.setDate(today.getDate()+1) jQuery('#datepicker').dateRangePicker({ startDate: today, inline:true, showTopbar:false, container: '.daterangepicker', alwaysOpen:true, stickyMonths:true, // customArrowPrevSymbol:'<i class="fa fa-angle-left"></i>', // customArrowNextSymbol:'<i class="fa fa-angle-right"></i>', /*hoveringTooltip: function(days, startTime, hoveringTime){ $('.ifly-widget .departure-picker button.nights').text(days+' Days') return days }*/ }).bind('datepicker-change',function(event, obj){ console.log('change',event, obj) // $('departure-selection') })
But its working fine on the Demo
This happens because the element does not exists but the container does, which datepicker-change event can't be attached to the jQuery('#datepicker') element
datepicker-change
jQuery('#datepicker')
Why is it not working? already tried the
.on('datepicker-change')
and.bind('datepicker-change')
but still won't triggerBut its working fine on the Demo