gpt4 book ai didi

javascript - 添加新的全日历事件后添加类名

转载 作者:行者123 更新时间:2023-11-30 21:18:19 27 4
gpt4 key购买 nike

你好,我正在使用 FullCalendar,在日历完全加载后,我使用带有 url 的“addEventSource”添加了更多事件

calendar.fullCalendar('addEventSource', url)

这工作正常,但我想为这些事件添加一个自定义类,我不知 Prop 体怎么做。我试过修改事件,但我的函数显然在 addEventSource 之前执行...那么,我该怎么办?我在这里读到我应该从后端添加类,但我无法编辑包含日历所有信息的端点。

那么,有没有人知道如何解决这个问题?

谢谢

最佳答案

看看https://fullcalendar.io/docs/event_data/eventDataTransform/

This hook allows you to receive arbitrary event data from a JSON feed or any other Event Source and transform it into the type of data FullCalendar accepts. This let's you easily accept alternative data formats without having to write a completely custom events function.

This function is called once per received event. eventData is the event data that has been receieved. The function must return a new object in the Event Object format.

关于javascript - 添加新的全日历事件后添加类名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45447274/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com