how to make a dismissible event in fullcalendar?

61 Views Asked by At

Is it possible in fullcalendar to have the same behavior than in bootstrap dismissible alerts for removing an event?

I would like to have the same behavior than in Bootstrap alert in the following example: https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_alerts_fade&stacked=h

1

There are 1 best solutions below

0
On BEST ANSWER
element.find('div.fc-title').append("<span id='eventTimes'><i class='fas fa-times'/></span>");
                    element.find("#eventTimes").click(function () {
                        deleteBookingById(event._id);
                        $('.tooltip').remove();
                    });

function deleteBookingById(id) {

            if (confirm('Do you want to remove this booking?')) {
                // ToDo: C# delete part
                $('#calendar').fullCalendar('removeEvents', id);
                setNormalBehavior();
            }

    }