Search
Recurrence Class
See Also
 






Defines recurrence patterns for items scheduled to repeat over and over again.

Namespace: MindFusion.Scheduling
File: Recurrence.js

 Syntax

JavaScript  Copy Code

// class
Recurrence.prototype = {}

 Example

The following code creates a recurrent item and adds it to the items collection of a schedule.

JavaScript  Copy Code

var p = MindFusion.Scheduling;
/ add a recurrent item
item = new p.Item();
item.startTime = p.DateTime.fromDateParts(date.year, date.month, date.day, 14, 0, 0);
item.endTime =  p.DateTime.fromDateParts(date.year, date.month, date.day, 16, 0, 0);
item.subject = "Take a power nap";
item.details = "zzz";

// setup the recurrence
var recurrence = new p.Recurrence();
recurrence.pattern = p.RecurrencePattern.Weekly;
recurrence.daysOfWeek = p.DaysOfWeek.Wednesday;
recurrence.startDate = date;
recurrence.recurrenceEnd = p.RecurrenceEnd.Never;
item.recurrence = recurrence;

calendar.schedule.items.add(item);

 Inheritance Hierarchy

MindFusion.Scheduling.Recurrence

 See Also