开发者

How should I update an iCal RRULE when moving an appointment?

I'm switching my app's calen开发者_如何学JAVAdar from Telerik Scheduler to jQuery fullcalendar. I'm storing recurring events in the db using iCal RRULEs.

The question is, when someone drags an event to a new date, how can I update the RRULE so each subsequent occurrence is bumped by the same time delta?

I've looked at DDay.iCal and I see the method

RecurrencePattern.IncrementDate(ref iCalDateTime dt, int Interval)

That sounds like what I'm looking for, but there are no details in the documentation.

Any suggestions?

Thanks so much,

Michael


RecurrencePattern.IncrementDate is not really meant to be used outside of the library itself. Perhaps I'll look into making it protected/private (if it can be done without breaking the overall functionality).

Generally, all you need to do is change the Start of the event by the delta you've determined (let's say 1 day, for example), and every recurrence in that event will also be changed by that amount.

If you don't want the entire event to be changed by the delta, but only a specific occurrence, then there's other ways to handle that.

Could you clarify perhaps with an example event, the delta you want to move it, and the expected result?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜