Search
Item.id Property
See Also
 






Gets or sets the string identifier of this item.

Namespace: MindFusion.Scheduling
File: Item.js

 Syntax

JavaScript  Copy Code

get id() {}

 Property Value

String that identifies the Item.

 Remarks

Used by the getItemById method of schedule.

 Example

The following code creates a new item for a birthday celebration that takes the whole present day. It provides the item with an id and then shows how to search for this item.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

var date = p.DateTime.today();

// create a new item
var item = new p.Item();
item.subject = "Birthday Celebration";  
item.startTime = date;
item.endTime = p.DateTime.addDays(date.clone(),1);
item.allDayEvent = true;
item.location = getLocation(item.subject);
item.id = "birthday";
calendar.schedule.items.add(item);
………

var bItem = calendar.schedule.getItemById("birthday");

 See Also