I am using bootstrap DatePciker and I want to add the Click event on days (td). When I click on any day, add a class to this day (td). but it does not work.
$('#calendar').datepicker({
multidate: true,
todayHighlight: true,
todayBtn: true
});
$('tbody').on('click','td.day',function(e){
e.preventDefault();
$(this).addClass('clicked');
});
working example on jsfiddle
source
share