0

我正在使用FullCalendar为我的项目创建日历。

日历正在运行,但我想创建一个选项来添加定期事件。我将为用户创建表单以添加事件,但我应该如何创建重复事件?

例如,如果用户创建一个每周重复的事件,则在星期三。如何将其添加到我的数据库中?

4

1 回答 1

0

This is not a simple solution, however it can be done. see the folllowing link for details Recurring Events in fullCalendar - the gist of it is this

three phases of event handling: add, edit delete. technically view is a phase but it is trivial

on create you need to determine repetition rate, I will leave the form aspect of that up to you

the data you will need is, unique event id, isRecurring(boolean), unique repeat id FOR EACH REPEAT, date of repetition (I prefer to calculate this and store event dates).

edits/delete now become a bit more challenging: the user needs to be prompted to choose between a specific event or all events in the queue. if it is specific. all changes are made to match the unique repeat id. if it is all event, the parent event id is used.

this solution is very high level, but you don't provide any starting point for a code solution

于 2014-01-04T11:54:26.153 回答