Search
Calendar.locations Property
See Also
 






Gets the locations whose schedule to display when the groupType property is set to GroupByLocations or FilterByLocations.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

get locations() {}
set locations(value) {}

 Property Value

An ObservableCollection with the Location-s.

 Example

The following function groups calendar items according to the GroupType value provided as parameter and assigns the value to the groupType property. If grouping is done by locations, the method uses the locations property to specify the locations to group by.

JavaScript  Copy Code
function group(value) {
 calendar.contacts.clear();
 if (value == p.GroupType.GroupByContacts) {
  // add the contacts by which to group to the calendar.contacts collection
  calendar.contacts.addRange(calendar.schedule.contacts.items());
 }
 calendar.locations.clear();
 if (value == p.GroupType.GroupByLocations) {
  // add the locations by which to group to the calendar.locations collection
  calendar.locations.addRange(calendar.schedule.locations.items());
 }
 calendar.groupType = value;
}

 See Also