[英]How I can delete event using event's date in fullcalendar
I try to delete an event using event's date. 我尝试使用事件的日期删除事件。 I see in documentation like the following
我在如下文档中看到
idOrFilter may also be a filter function that accepts one Event Object argument and returns true if it should be removed.
idOrFilter也可以是一个过滤器函数,它接受一个Event Object参数,如果应该将其删除,则返回true。
So, I just try like the following 所以,我只是尝试如下
$('#calendar').fullCalendar('removeEvents', event.start);
It's no difference with removing with id. 用id删除没有区别。
Why I try to remove using event date is I have an event and it can be drag and drop to the calendar's difference date. 为什么要尝试使用事件日期删除,是因为我有一个事件,可以将其拖放到日历的不同日期。 Like this example .
像这个例子 。 And I just want to delete event from specific date.
我只想从特定日期删除事件。 But now it's just removing all the events.
但是现在它只是删除所有事件。 I appreciate all of helps.
我感谢所有帮助。
You need to specify the ID of the event object that you want to remove. 您需要指定要删除的事件对象的ID。
$('#calendar').fullCalendar('removeEvents', "ID");
If you do not specify any ids, it will simply remove all events. 如果您未指定任何ID,它将仅删除所有事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.