I'm using the select callback when adding events. The following code worked in v1 but I'm getting the Uncaught TypeError in v2. When I remove the ajax code there is no error but of course I need to add the new event to the database.
select: function(start, end, jsEvent, view) {
var title = 'Available';
var eventData;
eventData = {
title: title,
start: start
};
$.ajax({
type : 'POST',
url : 'add-event.php',
data: eventData,
success : function(data){
$('#calendar').fullCalendar('renderEvent', {
id: data.id,
title: data.title,
start: data.start,
start: data.end
}, true);
$('#calendar').fullCalendar('unselect');
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
}
});
},