按类名删除事件

时间:2012-05-16 17:45:23

标签: fullcalendar

我正在尝试使用Full Calendars removeEvents函数来删除具有相同className的一组事件。我认为我输入的语法并不完全正确。

  

$('#calendar')。fullCalendar('removeEvents',event.className === user);

这是ajax脚本的一部分。当readyState == 4时,这是执行的最后一位代码。

目前,它会删除所有日历条目。我知道如何通过ID删除,但我不认为我非常理解Filter字符串语法。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

您需要使用事件对象作为参数传递ID 过滤器函数。

$('#calendar').fullCalendar('removeEvents', myRemove);

function myRemove(event) {
    return "user" === event.className; // ensure your events have this custom class !
}

The docu

相关问题