SchedulerComponent
Represents the Kendo UI Scheduler component for Angular.
Definition
Package:@progress/kendo-angular-scheduler
Selector:kendo-scheduler
Syntax:
<kendo-scheduler [kendoSchedulerBinding]="events" [selectedDate]="selectedDate">
<kendo-scheduler-day-view></kendo-scheduler-day-view>
</kendo-scheduler>
Inputs
allDaySlot
boolean
Toggles the visibility of the all-day slot. Applies to Day, Multi-Day, Week, and Work-Week views.
true
columnWidth
number
Sets the column width for Timeline views.
100
currentTimeMarker
boolean | CurrentTimeSettings
Sets the Scheduler current time marker settings.
true
editable
boolean | EditableSettings
Specifies whether the Scheduler is editable.
When you use an EditableSettings object, you can control which actions are enabled, such as adding, editing, dragging, removing, or resizing events.
false
endTime
string
Sets the end time of the view. Accepts a string in HH:mm format. Applies to Day, Week, and Timeline views.
'00:00'
Defines a function that is executed for every event in the view.
The function returns a value supported by ngClass.
eventHeight
number
Sets the height of events in the Month and Timeline views, and the height of All day events in the Day and Week views.
25
events
any[]
Sets the array of event instances shown by the Scheduler.
Provide an array of SchedulerEvent objects to display events in the Scheduler.
To bind data from custom object schemas, configure the modelFields property to map your custom fields to the Scheduler event fields.
Defines a function that is executed for every event in the view.
The function returns a value supported by ngStyle.
Configures resource-based grouping in the Scheduler. When set, the Scheduler arranges events into separate lanes or columns according to the resources defined in the resources property. Use to enable visual separation and hierarchical organization of events by resource type.
Specifies the days that will be hidden from the view.
Applies to Week, MultiWeek, WorkWeek, Month, MultiDay, TimeLineWeek, TimeLineMonth, and Agenda views.
Accepts an array of Day enum values.
Defines the settings for highlighting ongoing events in the Scheduler.
true
A callback that is executed 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
Specifies whether the Scheduler displays a loading indicator.
false
max
Date
Sets the maximum date that you can select using the Scheduler navigation.
min
Date
Sets the minimum date that you can select using the Scheduler navigation.
Sets the names of the model fields from which the Scheduler reads its data (see example).
Use modelFields when you want to bind custom event objects with property names that differ from the default SchedulerEvent fields. This lets you map your data to the Scheduler's expected fields.
Specifies the collection of resources available for event assignment in the Scheduler. Each resource describes a category and provides metadata.
scrollTime
string | Date
Sets the time to which the view initially scrolls. Accepts a string in HH:mm format or a JavaScript Date object. Applies to Day, Week, and Timeline views.
selectable
boolean
Specifies whether the Scheduler's day or time slots are selectable (see example).
When set to true, the Scheduler emits slotDragStart, slotDrag, and slotDragEnd events on user interaction.
false
selectedDate
Date
Sets the currently selected date of the Scheduler. Determines the displayed period.
selectedViewIndex
number
Sets the index of the currently selected view. The default value is 0, which shows the first declared view.
0
showFooter
boolean
Specifies whether to display the Scheduler footer.
true
showToolbar
boolean
Specifies whether to display the Scheduler toolbar.
true
showWorkHours
boolean
Sets whether the view shows business hours on initialization. By default, the view shows full-day hours. Applies to Day, Week, and Timeline views.
false
Defines a function that is executed for every slot in the view.
The function returns a value supported by ngClass.
slotDivisions
number
Sets the number of divisions for the time slots. Applies to Day, Week, and Timeline views.
2
slotDuration
number
Sets the duration (in minutes) of the time slots. Applies to Day, Week, and Timeline views.
60
slotFill
number
Sets the percentage of the slot filled by events. Accepts a value between 0 and 1. Applies to Day and Week views.
0.9
startTime
string
Sets the start time of the view. Accepts a string in HH:mm format. Applies to Day, Week, and Timeline views.
'00:00'
timezone
string
Sets the timezone ID displayed in the Scheduler. For example, Europe/Sofia.
'Etc/UTC'
Sets the first day of the week. Applies to Week, Month, and TimelineWeek views. Defaults to the locale settings.
workDayEnd
string
Sets the end time of the view when showWorkHours is true. Accepts a string in HH:mm format. Applies to Day, Week, and Timeline views.
'17:00'
workDayStart
string
Sets the start time of the view when showWorkHours is true. Accepts a string in HH:mm format. Applies to Day, Week, and Timeline views.
'08:00'
Sets the end of the work week. Applies to Day, Week, and Timeline views.
5
Sets the start of the work week. Applies to Day, Week, and Timeline views.
1
Fields
Gets the currently active event, if any. The active event is the event that can currently receive focus.
The currently selected view.
Events
Fires when the user cancels the editing by clicking the Cancel command button.
Emits when the user creates a new event using the 'c' key (see example).
Emits when the displayed date range in the Scheduler changes.
Fires while the user is dragging a Scheduler event.
Fires when the user stops dragging a Scheduler event.
Fires when the user starts dragging a Scheduler event.
Fires when a Scheduler event is clicked.
Fires when a Scheduler event is double-clicked.
Emits when you press a key on a focused Scheduler event.
Emits when the Scheduler is about to perform a navigation action, such as changing the view, date, or focus.
Fires when the user clicks the PDF export command button.
Fires when the user clicks the Remove icon of a Scheduler event.
Emits while the user is resizing a Scheduler event.
Fires when the user stops resizing a Scheduler event.
Fires when the user starts resizing a Scheduler event.
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.
Emits when a Scheduler view slot is clicked.
Fires when a Scheduler view slot is double-clicked.
Fires while the user is drag-selecting a Scheduler slot range.
Fires when the user stops drag-selecting a Scheduler slot range.
Fires when the user starts drag-selecting a Scheduler slot range.
Methods
Creates a popup editor for the new event.
The FormGroup that describes
the edit form. If called with a data item, the parameter will build the FormGroup from the data item fields.
Closes the event editor, if open.
Switches the specified event in edit mode.
The event that will be switched to edit mode.
optionsEditEventArgsAn object which contains the form group that will be bound in the edit dialog and the current edit mode.
Returns the event associated with the specified DOM element, if any.
Focuses the last focused scheduler element or the Scheduler element, if no events are available.
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.
The relative position of the event to focus.
Returns:boolean
true if the focused event changed. Otherwise, returns false.
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.
The relative position of the event to focus.
Returns:boolean
true if the focused event changed. Otherwise, returns false.
Returns a flag which indicates if an event is currently edited.
boolean
- A flag which indicates if an event is currently edited.
Opens the built-in confirmation dialog for defining the edit mode that will be used when the user edits or removes a recurring event.
The type of operation that will be confirmed. Has to be either Edit or Remove.
Returns:Observable<EditMode>
the result from the confirmation dialog.
Opens the built-in removal confirmation dialog.
Observable<boolean>
the result from the confirmation dialog.
Saves the current view as PDF.
Scrolls the view to the specified time.
Returns the current view slot that matches the passed document position.
The x document position.
ynumberThe y document position.
Returns:- The slot.