Jquery Fullcalendar eventDrop更改背景色

Jquery Fullcalendar eventDrop更改背景色,jquery,fullcalendar,Jquery,Fullcalendar,我正在使用最新的fullcalendar,不知道是否有人可以显示以更改已删除事件的背景颜色?在日历配置中尝试此操作,看看您能做些什么 eventDrop: function(event, delta, revertFunc, jsEvent, ui, view) { console.log(ui); // is likely to have the parent as the day/square you dropped onto. } 如果不是:则尝试通过事件中的日期对象查找TD:

我正在使用最新的fullcalendar,不知道是否有人可以显示以更改已删除事件的背景颜色?

在日历配置中尝试此操作,看看您能做些什么

eventDrop: function(event, delta, revertFunc, jsEvent, ui, view) {
    console.log(ui);  // is likely to have the parent as the day/square you dropped onto.
}
如果不是:则尝试通过事件中的日期对象查找TD:

var newDate = event.start.format('YYYY-MM-DD');
$('td').find("[data-date='" + newDate + "']");  //this seems to only get the header.

另一种方法是利用jsEvent查找事件被丢弃的位置/dom对象。这超出了我头脑中所知道的。但是应该不会太难做到。

您只需要更改CSS即可

如果您使用的是最新的Fullcalendar[2.3.0],则有一个名为Fullcalendar.CSS-edit行52的CSS文件: 背景:bce8f1; 不透明度:.3; 过滤器:alphaopacity=30

只需将背景更改为您想要的颜色


[当您单击一天时,FC会向DOM中添加一个具有FC类高亮显示骨架的元素,在其中的HTML中,添加一个具有FC类高亮显示的元素。]

这个答案与此完全无关。