如何在Fullcalendar中向事件块添加关闭按钮

如何在Fullcalendar中向事件块添加关闭按钮,fullcalendar,Fullcalendar,我需要在事件中添加“关闭”按钮,以便将其从日历中删除。由于“文本”字段不接受HTML,我不能直接这样做。修改事件HTML的最佳方法是什么?我成功地使用eventRender回调函数添加了一个关闭按钮 eventRender: function(event, element) { element.html(event.title+"<i class='fa fa-close pull-right text-danger' id='"+event.i

我需要在事件中添加“关闭”按钮,以便将其从日历中删除。由于“文本”字段不接受HTML,我不能直接这样做。修改事件HTML的最佳方法是什么?

我成功地使用eventRender回调函数添加了一个关闭按钮

 eventRender: function(event, element) {
                    element.html(event.title+"<i  class='fa fa-close pull-right text-danger' id='"+event.id+"'></i>");
                },
eventRender:function(事件,元素){
html(event.title+“”);
},

但我无法让按钮工作。请让我知道您是否可以让按钮工作。

从Bootstrap-3添加垃圾图标

eventRender: function(event, element) {
   element.html(event.title + '<span class="removeEvent glyphicon glyphicon-trash pull-right" id="Delete"></span>');
}
eventClick: function(calEvent, jsEvent, view) {
  if (jsEvent.target.id === 'Delete') {
    $("#myModal").modal(); // Maybe show a modal dialog asking the user if he wants to delete the event. 
  }
}