I am using the fullCalendar.js and the current problem is making i lose so much time on something that might be simple to whose understand javascript (more specific jquery) bett
The way i found:
//HTML Code to add the button
-
//Our Js data
{id: '1', resourceId: 'a' , start: '2015-10-16T10:52:07', end: '2015-10-16T21:00:00', url: 'https//www.google.com', title: 'How to delete Events'},
{id: '2', resourceId: 'b' , start: '2015-10-16T11:00:10', end: '2015-10-18T17:03:00', title : 'Can we delete multiple events ?'},
{id: '2', resourceId: 'c' , start: '2015-10-16T10:00:00', end: '2015-10-16T23:00:02', title : 'How ?'},
],
//Need to set our button
select: function(start, end, jsEvent, view, resource) {
console.log(
'select callback',
start.format(),
end.format(),
resource ? resource.id : '(no resource)'
);
}
});
//Our button to delete Events
$('#Delete').on('click', function() {
$('#calendar').fullCalendar('removeEvents', 2); //Remove events with the id: 2
});
});