angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 728 forks source link

how to delete an event on click with X button #493

Closed amarie401 closed 7 years ago

amarie401 commented 7 years ago

How do you delete an event on click on the calendar with an X button option?

https://jsfiddle.net/eddiriarte/yy1rud17/

I was thinking of using something like this but I can't get it work. Thank you!

eventRender: function(event, element) { element.append( "<span class='closeon'>X</span>" ); element.find(".closeon").click(function() { $('#calendar').fullCalendar('removeEvents',event._id); }); }