Recurring events

ChrisRM edited this page Mar 22, 2012 · 1 revision

Add recurring events to your calendar.


// As recurring events only works when using eventkit 
// as our datasource, make sure its set.
// For this event, we want it to repeat every other day in one month.
// Start by creating the end date for our recurrence rule.
var recurringEnd = new Date();
// Let's make the event last for 3 hours.
var eventEnd = new Date();
// Create and add the event to the calendar.
    title: "Once every other day in one month",
    startDate: new Date(),
    endDate: eventEnd,
    location: "Appcelerator's HQ",
    note: "A note...",
    recurrence: { 
        frequency: "day", // day, week, month, year
        interval: 2, // 1 = every day, 2 = every other day, 3 = every third day and so on...
        end: recurringEnd 

This is for EventKit only.