My code :
$('#datepicker').datepicker({
inline: true,
onSelect: function(dateText, inst) {
var d = new Date(dateText);
alert("DateText=>"+ dateText + "," + "DATE =>" + d);
$('#calendar').fullCalendar('gotoDate', d);
}
});
})
My error :

My problem is that the function is being passed dateText from fullCalendar in the form dd/mm/yyyy…it is then creating a new date using this and it is messing it up, thinking that the date should be in the form mm/dd/yy. Can anyone help me fix this please?
You are alerting the dateText but passing a date object to calendar. Look at FullCalendar API for format of ‘gotDate’ argument. You can use