As described in the docs, the Eternicode version of bootstrap-datepicker adds three attributes to the changeDate
event that can be used for accessing the newly selected date. You'll be interested in either the .date
property (which points to the actual date object representing the selected date) or the .format
method, which you can use to get the date as a string.
Assuming the simplest case (where you have a single picker and you want to get the date as a string in the same format that you initialised the datepicker with), you'll just want to call .format()
with no arguments:
$('#calendar').on('changeDate', function(event) {
alert(event.format());
});
Here's a JSFiddle showing this in action: http://jsfiddle.net/bhm7p/3/