FullCalendar 如何解释 Google 日历中的重复事件?
我正在使用自定义后端来存储事件信息。重复事件数据以 iCal 格式存储在数据库中。检索它并构建有效的重复规则很容易。解释这些规则显然并不那么容易。
前端是 jQuery 日历,FullCalendar。当向 FullCalendar 提供来自 Google 日历的有效事件源时,重复事件会 100% 准确地显示给我。这让我很困惑,因为 gcal.js 文件中没有将 gd$recurrence 数据发送到 FullCalendar 的代码。
gcal.js 从 Google 输出中获取 8 个字段,将它们放入一个事件中,然后将其推送到事件堆栈中。这 8 个字段都与复发无关。
FullCalendar 使用的 JSON Event 对象 没有“重复”属性,所以我不能简单地将我的重复规则放入 event.recurrence 并使其起作用。
我尝试过模拟 Google 的输出并欺骗 FullCalendar 认为它是合法的 feed,但这也不起作用。
那么,我的问题是,FullCalendar 如何准确地解释这些重复发生的事件?当然,我怎样才能让我的 iCal 重复数据以同样的方式工作?
I'm using a custom back-end to store event information. Recurring event data are stored in iCal format in the database. Retrieving this and building a valid recurrence rule is easy. Interpreting those rules is obviously not as easy.
The front-end is the jQuery calendar, FullCalendar. When supplying FullCalendar with a valid events feed from Google Calendar, recurring events are displayed 100% accurately for me. This confuses me because there is no code in the gcal.js file that sends the gd$recurrence data to FullCalendar.
gcal.js takes 8 fields from the Google output, places them into an event which is pushed into an events stack. None of those 8 fields has anything to do with recurrence.
The JSON Event object that FullCalendar uses does not have a 'recurrence' property, so I can not simply throw my recurrence rules into event.recurrence and have it work.
I've tried simulating Google's output and tricking FullCalendar into thinking it's a legitimate feed, but that didn't work either.
So, my question is, how does FullCalendar interpret these recurring events accurately? And of course, how can I get my iCal recurrence data to work the same way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现我在对 Google 的 API 调用中缺少“singleevents”参数。 FullCalendar 不解释 RRULE。谷歌确实如此。
I discovered that I was missing the "singleevents" parameter in my API calls to Google. FullCalendar does not interpret the RRULE. Google does.