New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

SchedulerTimeSlot and SchedulerModel Object

Each of the Views - Week, Month and Timeline - and its specific Time Slot are represented by a Model and a TimeSlot client-side object respectively. All Model objects inherit from one common interface - ISchedulerModel, whereas all TimeSlot objects inherit from another common interface - ISchedulerTimeSlot.

The tables below list all public properties and methods of the both client-side interfaces which all specific Model or TimeSlot objects have.

ISchedulerTimeSlot Interface Properties

 

NameParametersReturn TypeDescription
get_index()NoneStringGets the index of the Time Slot.
get_isAllDay()NoneBooleanGets a value indicating whether the Time Slot is an All-Day Time Slot.
get_startTime()NoneDateGets the full start time of the Time Slot.
get_endTime()NoneDateGets the full end time of the Time Slot.
get_resource()NoneSchedulerResource / nullIf the current View is grouped by Resource, returns the Resource object. Otherwise, returns null. See Example 1.
set_selected()BooleanNoneSelects/Un-selects the Time Slot
get_selected()NoneBooleanGets a value indicating whether the Time Slot is selected

Example 1: Get the Time Slot's resource.

JavaScript
	     
function clientTimeSlotClick(sender, eventArgs)
{
	var resource = null;
	var timeSlot = eventArgs.get_targetSlot();
	if (timeSlot.get_resource)
	resource = timeSlot.get_resource();
}
				

ISchedulerModel Interface Methods

 

NameParametersReturn TypeDescription
getTimeSlotFromDomElement()DomElementISchedulerTimeSlotGets the appropriate Time Slot for the current view.
getTimeSlotForAppointment()appointmentISchedulerTimeSlotGets the appropriate Time Slot for the appointment in the current view.
get_visibleRangeStart()DateGets the first visible date of the current view.
get_visibleRangeEnd()DateGets the last visible date of the current view.

See Also