Home Ask Login Register

Developers Planet

Your answer is one click away!

Sorikairo February 2016

FullCalendar removing only one event

My question is why this code doesn't remove a single event, but all at once, whereas the firing event is the good (so is the id).

Attaching click event on the icon when rendering the event :

   eventRender: function(event, element) {
 if (event.type != "itineraire")
    element.find('.fc-title').append('<span class="removeEvent fa fa-trash pull-right"></span>');
      element.find(".fa-trash").click(function() {

The app.removeEvent(id) function:

  console.log("we remove id " + id);


Chintan Mirani February 2016

Try this.

    console.log("we remove id " + id);
    $('#calendarContainer').fullCalendar( 'removeEvents', function(event) {
        return (event._id == id);

This works for me.

Post Status

Asked in February 2016
Viewed 3,752 times
Voted 11
Answered 1 times


Leave an answer

Quote of the day: live life