$(function() {
$("#datepicker").datepicker();
$("#datepicker").val();
$("#datepicker").on("change",function(){
var selected = $(this).val();
alert(selected);
});
});
var d = $('div#someID').datepicker('getDate');
if(this.selected){
console.log(this.selected.endDate.format("DD-MMMM-YY"); // need to show date in DD-MMMM-YY Format
}