Search
Schedule.items Property
See Also
 






Gets the collection of items in this schedule.

Namespace: MindFusion.Scheduling
File: Schedule.js

 Syntax

JavaScript  Copy Code

get items() {}

 Property Value

An ObservableCollection containing Item instances.

 Example

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

JavaScript  Copy Code

// 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";

 // add a custom css class to some items
 if (i % 5 == 0)
 {
  item.cssClass = "myItemClass";
  item.details = "It is of utmost importance!"
 }
 calendar.schedule.items.add(item);
}

 See Also