Search
Item Constructor
See Also
 






Initializes a new instance of the Item class.

Namespace: MindFusion.Scheduling
File: Item.js

 Syntax

JavaScript  Copy Code

function Item ()

 Example

The following code creates 15 schedule Items and adds them to the items collection of a schedule.

JavaScript  Copy Code

var p = MindFusion.Scheduling;
......................

var item;
var date = p.DateTime.today();

// add some items to the schedule items collection
for (var i = 0; i < 15; i++)
{
 item = new p.Item();
  item.startTime = p.DateTime.addMinutes(date, 2);
 item.endTime = p.DateTime.addHours(item.startTime, 2);
 item.subject = "Yoga";

 calendar.schedule.items.add(item);
}

 See Also