$('.datepicker').datepicker().on('changeDate', function(ev) { // YOUR CODE }).on('hide', function(event) { event.preventDefault(); event.stopPropagation(); });