Reputation: 1109
I'm trying to remove all events for a single day using the jquery fullCalendar plugin. Is this possible?
I'm trying to do it via the removeEvents() function but i'm having no luck. The docs say I can pass in one Event Object argument but i'm not really sure what this means.
Thanks in advance
James
Upvotes: 1
Views: 9724
Reputation: 5631
Try this:
$('#calendar').fullCalendar( 'removeEvents', function(event) {
if(event.start.toDateString()===new Date(2013, 1,1).toDateString())
return true;
});
Fiddle: http://jsfiddle.net/100thGear/wcR7a/
Basically, the removeEvents
function goes through all your events and passes it to the second parameter. This parameter is a function above - which checks these events and returns true to all the events that have to be deleted.
Hope this helps!
Upvotes: 5