【问题标题】:Fullcalendar v5 rendering of all events is completedFullcalendar v5 渲染所有事件完成
【发布时间】:2021-06-21 14:59:54
【问题描述】:

在呈现所有事件时,我找不到事件调用的方法。 渲染完所有事件后,我需要遍历每个月的每个星期并对其进行一些计算。

看起来此选项在版本 3 中可用,但在版本 5 中不可用

【问题讨论】:

  • 你是对的,这已在 v4 中删除。升级指南解释了原因:fullcalendar.io/docs/v4/upgrading-from-v3eventAfterAllRender Removed. The concecpt of event rendering being fully complete is flawed (such as when events are revealed in a +more popup). You should operate on individual events instead, via eventPositioned or use some other callback.。因此,您必须使用单独的事件函数,将每周所有事件的计数保存在您自己的变量中,然后将其用于计算。

标签: angular fullcalendar fullcalendar-5


【解决方案1】:

也许你应该看看https://fullcalendar.io/docs/eventsSet

请注意,这个回调也在初始化阶段被调用(所以它的第一个调用可能不是你正在等待的那个)

在我的例子中,我必须使用布尔值来了解在 AJAX getEvents 完成后是否触发了此回调。

【讨论】:

    猜你喜欢
    • 2012-05-22
    • 2022-01-03
    • 1970-01-01
    • 2013-05-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-07
    相关资源
    最近更新 更多