Search
Schedule.getAllItems Method
See Also
 






Retrieves all events, including recurrent item instances, scheduled to occur in the specified time interval.

Namespace: MindFusion.Scheduling
File: Schedule.js

 Syntax

JavaScript  Copy Code

function getAllItems (startTime, [endTime, [resource]])

 Parameters

startTime

DateTime. Time interval start.

endTime
Optional.

DateTime. Time interval end.

resource
Optional.

Resource. A resource that must be related to the event.

 Return Value

List. The list of events scheduled to occur in the specified period.

 Example

The following code gets all appointment for the specified resource. The time span begins with the first day, visible in the calendar and spans 10 days.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

var startTime = p.DateTime.getWeekFirstDate(calendar.date);
var endTime = p.DateTime.addDays(startTime.clone(),10);

var resource;

// add a resource to the schedule.resources collection
resource = new p.Resource();
resource.name = "Emmy Smith";
resource.id = "K-12";
resource.tag = "Teachers";
calendar.schedule.resources.add(resource);

var _EmmyAppointments = calendar.schedule.getAllItems(startTime, endTime, resource);

 See Also