New to Kendo UI for Angular? Start a free 30-day trial

SchedulerComponent

Represents the Kendo UI Scheduler component for Angular.

Selector

kendo-scheduler

Inputs

NameTypeDefaultDescription

allDaySlot

boolean

true

Toggles the visibility of the all-day slot. Applicable for the Day, Multi-Day, Week, and Work-Week views.

columnWidth

number

100

Specifies the columns width. Applicable for the Timeline views.

currentTimeMarker

boolean | CurrentTimeSettings

true

Specifies the Scheduler current time marker settings.

editable

boolean | EditableSettings

Specifies if the Scheduler is editable.

endTime

string

'00:00'

The end time of the view. The Scheduler displays events which end before the end time. Accepts string values in the HH:mm format. Applicable for the Day, Week, and Timeline views.

eventClass

(args: EventStyleArgs) => any

Defines a function that is executed for every event in the view. The function returns a value which is supported by ngClass.

eventHeight

number

25

The height of the events in the Month and Timeline views, and the height of the All day events in the Day and Week views.

events

any[]

An array of event instances which will be shown by the Scheduler.

eventStyles

(args: EventStyleArgs) => any

Defines a function that is executed for every event in the view. The function returns a value which is supported by ngStyle.

group

Group

Specifies the groups of the Scheduler.

highlightOngoingEvents

boolean | OngoingEventsSettings

true

Specifies the settings for the ongoing events highlight of the Scheduler.

isSlotSelected

(args: IsSlotSelectedArgs) => boolean

A callback that executes for each slot of the Scheduler view. If it returns true, the k-selected CSS class will be added to the cell, making it visibly selected.

loading

boolean

false

Specifies if the Scheduler will display a loading indicator.

max

Date

The maximum date that can be selected by using the navigation of the Scheduler.

min

Date

The minimum date that can be selected by using the navigation of the Scheduler.

modelFields

SchedulerModelFields

The names of the model fields from which the Scheduler will read its data (see example).

resources

Resource[]

Specifies the resources of the Scheduler.

scrollTime

string | Date

'08:00'

The time to which the view will initially be scrolled. Accepts string values in the HH:mm format or a JavaScript Date. Applicable for the Day, Week, and Timeline views.

selectable

boolean

Specifies if the Scheduler's day or time slots are selectable (see example).

When this input is set to true, the Scheduler component will emit slotDragStart, slotDrag, and slotDragEnd events upon user interaction.

selectedDate

Date

The currently selected date of the Scheduler. Determines the period which is displayed.

selectedViewIndex

number

The index of the currently selected view.

By default, the selected view index is 0 and indicates that the first declared view is visible.

showWorkHours

boolean

false

If set to true, the view will be initially shown in the business-hours mode. By default, the view is displayed in the full-day mode. Applicable for the Day, Week, and Timeline views.

slotClass

(args: SlotClassArgs) => any

Defines a function that is executed for every slot in the view. The function returns a value which is supported by ngClass.

slotDivisions

number

2

The number of divisions of the time slots. Applicable for the Day, Week, and Timeline views.

slotDuration

number

60

The duration (in minutes) of the time slots. Applicable for the day, week and timeline views.

slotFill

number

0.9

A numeric value between 0 and 1 that specifies what percentage of the slot will be filled by the events. Applicable for the Day and Week views.

startTime

string

'00:00'

The start time of the view. The Scheduler displays events which start after the start time. Accepts string values in the HH:mm format. Applicable for the Day, Week, and Timeline views.

timezone

string

'Etc/UTC'

Specifies the id of the timezone that will be displayed in the Scheduler. For example, Europe/Sofia.

weekStart

Day

The first day of the week. Applicable to Week, Month and TimelineWeek views. Defaults to the locale settings.

workDayEnd

string

'17:00'

The end time of the view when showWorkHours is set to true. Accepts string values in the HH:mm format. Applicable for the Day, Week, and Timeline views.

workDayStart

string

'08:00'

The start time of the view when showWorkHours is set to true. Accepts string values in the HH:mm format. Applicable for the Day, Week, and Timeline views.

workWeekEnd

Day

5

The end of the work week. Applicable for the Day, Week, and Timeline views.

workWeekStart

Day

1

The start of the work week. Applicable for the Day, Week, and Timeline views.

Fields

NameTypeDefaultDescription

activeEvent

SchedulerEvent

Gets the currently active event, if any. The active event is the event that can currently receive focus.

selectedView

SchedulerView

The currently selected view.

Events

NameTypeDescription

cancel

EventEmitter<CancelEvent>

Fires when the user cancels the editing by clicking the Cancel command button.

create

EventEmitter<CreateEvent>

Fires when the user creates a new event using the 'c' key. (see example).

dateChange

EventEmitter<DateChangeEvent>

Fires when the date range that is displayed in the Scheduler changes.

drag

EventEmitter<DragEvent>

Fires when the user is dragging a Scheduler event.

dragEnd

EventEmitter<DragEndEvent>

Fires when the user stops dragging a Scheduler event.

dragStart

EventEmitter<DragStartEvent>

Fires when the user starts dragging a Scheduler event.

eventClick

EventEmitter<EventClickEvent>

Fires when a Scheduler event is clicked.

eventDblClick

EventEmitter<EventClickEvent>

Fires when a Scheduler event is double-clicked.

eventKeydown

EventEmitter<EventKeydownEvent>

Fires when a key is pressed on a focused Scheduler event.

navigate

EventEmitter<NavigateEvent>

Fires when the Scheduler is about to execute a navigation action (a view, date, or focus change).

pdfExport

EventEmitter<PDFExportEvent>

Fires when the user clicks the PDF export command button.

remove

EventEmitter<RemoveEvent>

Fires when the user clicks the Remove icon of a Scheduler event.

resize

EventEmitter<ResizeEvent>

Fires when the user is resizing a Scheduler event.

resizeEnd

EventEmitter<ResizeEndEvent>

Fires when the user stops resizing a Scheduler event.

resizeStart

EventEmitter<ResizeStartEvent>

Fires when the user starts resizing a Scheduler event.

save

EventEmitter<SaveEvent>

Fires when the user clicks the Save command button to save the changes of the edited event.

schedulerResize

EventEmitter<number>

Fires when the Scheduler is resized horizontally.

slotClick

EventEmitter<SlotClickEvent>

Fires when a Scheduler view slot is clicked.

slotDblClick

EventEmitter<SlotClickEvent>

Fires when a Scheduler view slot is double-clicked.

slotDrag

EventEmitter<SlotDragEvent>

Fires when the user is drag-selecting a Scheduler slot range.

slotDragEnd

EventEmitter<SlotDragEndEvent>

Fires when the user stops drag-selecting a Scheduler slot range.

slotDragStart

EventEmitter<SlotDragStartEvent>

Fires when the user starts drag-selecting a Scheduler slot range.

Methods

addEvent

Creates a popup editor for the new event.

Parameters

group

any

The FormGroup that describes the edit form. If called with a data item, the parameter will build the FormGroup from the data item fields.

closeEvent

Closes the event editor, if open.

editEvent

Switches the specified event in edit mode.

Parameters

dataItem

any

The event that will be switched to edit mode.

options

EditEventArgs

An object which contains the form group that will be bound in the edit dialog and the current edit mode.

eventFromElement

Returns the event associated with the specified DOM element, if any.

Parameters

element

Element

The DOM element document position.

Returns

SchedulerEvent

the event instance, if found.

focus

Focuses the last focused scheduler element or the Scheduler element, if no events are available.

focusNext

Focuses the next event or an event at a specified relative position. The options parameter can be used to set a positive or negative offset that is relative to the currently focused event (see example). A nowrap flag toggles the wrapping to the first or to the last item.

Parameters

position?

FocusPosition

The relative position of the event to focus.

Returns

boolean

true if the focused event changed. Otherwise, returns false.

focusPrev

Focuses the previous event or an event at a specified relative position. The options parameter can be used to set a positive or negative offset that is relative to the currently focused event (see example). A nowrap flag toggles the wrapping to the first or to the last item.

Parameters

position

FocusPosition

The relative position of the event to focus.

Returns

boolean

true if the focused event changed. Otherwise, returns false.

isEditing

Returns a flag which indicates if an event is currently edited.

Returns

boolean

  • A flag which indicates if an event is currently edited.

openRecurringConfirmationDialog

Opens the built-in confirmation dialog for defining the edit mode that will be used when the user edits or removes a recurring event.

Parameters

operation

CrudOperation

The type of operation that will be confirmed. Has to be either Edit or Remove.

Returns

Observable<EditMode>

the result from the confirmation dialog.

openRemoveConfirmationDialog

Opens the built-in removal confirmation dialog.

Returns

Observable<boolean>

the result from the confirmation dialog.

saveAsPDF

Saves the current view as PDF.

scrollToTime

Scrolls the view to the specified time.

Parameters

time

string | Date

slotByPosition

Returns the current view slot that matches the passed document position.

Parameters

x

number

The x document position.

y

number

The y document position.

Returns

SchedulerSlot

  • The slot.