views:

252

answers:

1

I'm switching my app's calendar 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

A: 

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?

Thanks, -Doug

Doug
Thank you, Doug...Say I want to watch LOST and I put it on my calendar for Monday nights.Then I find out it's actually on Tuesday nights. So I drag the first occurrence and drop it on Tuesday.The event handler (http://arshaw.com/fullcalendar/docs/event_ui/eventDrop/) includes a dayDelta and a minuteDelta, so I can certainly change the start date of this first occurrence. But how do I update the RRULE?In other words, how can I change the RRULE from "RRULE:FREQ=WEEKLY;BYDAY=MO" to "RRULE:FREQ=WEEKLY;BYDAY=TU" without the use of a complex UI (and instead by using drag-and-drop)?
kaneuniversal
Michael, The following will occur weekly on the same day as its first occurrence:"RRULE:FREQ=WEEKLY"So if you change your first occurrence from Monday to Tuesday, the weekly RRULE will not need to be changed. For a more complex recurrence rule set, it may; however, 95%+ of events follow a simple recurrence structure that is predictable.Let me know if you have any more questions :)
Doug