Gets or sets the css class of the control.
Namespace: MindFusion.Common
File: Control.js
JavaScript Copy Code |
---|
get cssClass() {} |
String. The name of the css class of the control.
The following code uses the cssClass property to specifies custom classes to Item instances of a schedule.
JavaScript Copy Code |
---|
for (var i = 0; i < 5; i++) { var item = new p.Item(); item.startTime = date.clone().addHours(Math.floor(Math.random() * 10) + 6); item.endTime = item.startTime.clone().addHours(1); var activity = calendar.schedule.resources.items()[0]; item.subject = activity.name; item.resources.add(activity); item.cssClass = "itemClass" + activity.id; calendar.schedule.items.add(item); } |