Search
Item Class
See Also
 






Represents appointments within a schedule.

Namespace: MindFusion.Scheduling
File: Item.js

 Syntax

JavaScript  Copy Code

// class
Item.prototype = {}

 Example

The following code creates 15 schedule items and each one starts 2 minutes after the present date. Each 5th item is assigned a custom cssClass and a message using its details property.

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

 // 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);
}

 Inheritance Hierarchy

MindFusion.Scheduling.Item

 See Also