Search
Item.recurrence Property
See Also
 






 Gets or sets the recurrence pattern of this item.

Namespace: MindFusion.Scheduling
File: Item.js

 Syntax

JavaScript  Copy Code

get recurrence() {}

 Property Value

Recurrence. An instance of the Recurrence class.

 Example

The following code creates a new Item and adds a Recurrence to it:

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// add a recurrent var 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);

 See Also