Scheduler API

Methods
addEvent adds a new event
addEventNow adds a new event and opens the lightbox to confirm
addMarkedTimespan marks dates, but with certain settings makes blocking (unlike blockTime() allows setting custom styling for the limit)
addSection adds a section to the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
addShortcut adds a new keyboard shortcut
attachEvent attaches the handler to an inner event of dhtmlxScheduler
backbone makes the scheduler reflect all data changes in the Backbone model and vice versa
blockTime blocks the specified date and applies the default 'dimmed' style to it.
callEvent calls an inner event
changeEventId changes the event's id
checkCollision checks whether the specified event occurs at the time that has already been occupied by another event(s)
checkEvent checks whether an event has some handler(s) specified
checkInMarkedTimespan checks whether an event resides in a timespan of a specific type
checkLimitViolation checks whether the specified event takes place at the blocked time period
clearAll removes all events from the scheduler
closeAllSections closes all sections in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
closeSection closes the specified section in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
collapse collapses the expanded scheduler back to the normal size
createGridView creates the Grid view in the scheduler
createTimelineView creates the Timeline view in the scheduler
createUnitsView creates the Units view in the scheduler
deleteAllSections deletes all sections from the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
deleteEvent deletes the specified event
deleteMarkedTimespan removes marking/blocking set by the addMarkedTimespan() and blockTime() methods
deleteSection deletes a section from the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
destroyCalendar destroys previously created mini-calendar
detachEvent detaches a handler from an event (which was attached before by the attachEvent method)
edit opens the inline editor to alter the event's text (the editor in the event's box)
editStop closes the inline event editor, if it's currently open
endLightbox closes the lightbox
event attaches an event handler to an HTML element
eventRemove removes an event handler from an HTML element
expand expands the scheduler to the full screen view
focus sets focus on the scheduler
formSection gives access to the objects of lightbox's sections
getActionData returns the current cursor-pointed date and section (if defined)
getEvent returns the event object by its id
getEventEndDate gets the event's end date
getEventStartDate gets the event's start date
getEventText gets the event's text
getEvents returns a collection of events which occur during the specified period
getLabel gets the label of a select control in the lightbox
getLightbox gets the lightbox's HTML object element
getRecDates returns all occurrences of a recurring event
getRenderedEvent gets the object of the currently displayed event
getSection gets the object of the specified section in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
getShortcutHandler gets a key navigation shortcut handler
getState gets the current state of the scheduler
getUserData gets the user data associated with the specified event
hideCover hides the lightbox modal overlay that blocks interactions with the remaining screen
hideQuickInfo hides the pop-up event form (if it's currently active)
highlightEventPosition highlights the event's duration on the time scale
init a constructor of a dhtmlxScheduler object
invertZones inverts the specified time zones
isCalendarVisible checks whether the calendar is currently opened in the scheduler
isOneDayEvent checks whether the specified event one-day or multi-day
isViewExists checks whether a view with the specified name exists
linkCalendar 'says' to change the active date in the mini calendar each time, the active date in the scheduler is changed
load loads data to the scheduler from an external data source
markCalendar applies a css class to the specified date
markTimespan marks and/or blocks date(s) by applying the default or a custom style to them. Marking is cancelled right after any internal update in the app. Can be used for highlighting
openAllSections opens all sections in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
openSection opens the specified section in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)
parse loads data from a client-side resource
removeShortcut removes a keyboard shortcut
renderCalendar creates a mini calendar
renderEvent generates HTML content for a custom event's box
resetLightbox removes the current lightbox's HTML object element
scrollUnit scrolls the specified number of units in the Units view
select selects the specified event
serverList returns a list of options
setCurrentView displays the specified view and date
setEvent adds a new event to the scheduler's data pool
setEventEndDate sets the event's end date
setEventStartDate sets the event's start date
setEventText sets the event's text
setLightboxSize forces the lightbox to resize
setLoadMode sets the mode that allows loading data by parts (enables the dynamic loading)
setUserData sets the user data associated with the specified event
showCover shows the lightbox modal overlay that blocks interactions with the remaining screen
showEvent shows and highlights the specified event in the current or specified view
showLightbox opens the lightbox for the specified event
showQuickInfo displays the pop-up event form for the specified event
startLightbox shows a custom lightbox in the specified HTML container centered on the screen
toICal converts scheduler's data to the ICal format
toJSON converts scheduler's data into the JSON format
toPDF exports the current view to a PDF document (can be used for printing)
toPDFRange exports several scheduler's views to a PDF document (can be used for printing)
toXML converts scheduler's data into the XML format
uid generates a unique ID (unique inside the current scheduler, not GUID)
unblockTime removes blocking set by the blockTime() method
unmarkCalendar removes a css class from the specified date
unmarkTimespan removes marking/blocking set by the markTimespan() method
unselect unselects the specified event
updateCalendar displays the specified date in the mini calendar
updateCollection updates the specified collection with new options
updateEvent updates the specified event
updateView displays the specified view and date (doesn't invoke any events)
Events
onAfterEventDisplay fires when the scheduler switches views, days, time etc. to show the event specified by the 'showEvent' method and fires AFTER the event is displayed
onAfterFolderToggle fires after a tree branch was opened or closed (the Timeline view, 'tree' mode only)
onAfterLightbox fires after the user has closed the lightbox (edit form)
onAfterQuickInfo fires after the pop-up event form is closed
onAfterSchedulerResize fires after the scheduler has changed its size and data area was repainted
onBeforeCollapse fires when a user clicks on the expand icon to change the scheduler's size from 'full screen' to original.
onBeforeDrag fires when the user starts the drag/resize operation (version 2.1+)
onBeforeEventChanged fires when the event has been changed by drag-n-drop, but the changes aren't saved yet.
onBeforeEventCreated fires when the user creates a new event by dragging the cursor over the scheduler
onBeforeEventDelete fires after the user clicks on the delete button (in the event bar or details window)
onBeforeEventDisplay fires when the 'showEvent' method is called to show a specific event and fires BEFORE the event is displayed
onBeforeEventDragIn fires before a dragged event is moved over the scheduler
onBeforeEventDragOut fires before the dragged event is moved out of the scheduler
onBeforeExpand fires when a user clicks on the expand icon to change the scheduler's size from original to 'full screen'.
onBeforeExternalDragIn fires before some element starts to be dragged into the scheduler from an outside DHTMLX component (only with dnd extension enabled)
onBeforeFolderToggle fires before a tree branch will be opened or closed (the Timeline view, 'tree' mode only)
onBeforeLightbox fires immediately before the user opens the lightbox (edit form)
onBeforeSectionRender fires before a single Timeline section was configured, but not rendered yet (the Timeline view only)
onBeforeTodayDisplayed fires when the user clicks on the 'Today' button in the scheduler
onBeforeTooltip fires before the tooltip is displayed for a data item (only with the 'tooltip' extension enabled)
onBeforeViewChange fires before the user changes the current view to some other one
onCellClick fires when the user makes a single click on a cell (the Timeline view only)
onCellDblClick fires when the user makes a double click on a cell (the Timeline view only)
onClearAll fires after data in the scheduler was cleared
onClick fires when the user clicks the left mouse button on an event
onCollapse fires when a user clicks on the expand icon to change the scheduler's size from 'full screen' to original.
onConfirmedBeforeEventDelete fires after the user clicks on the delete button and confirms the deletion (in the event's bar or details window)
onContextMenu fires when the user calls the context menu by clicking the right mouse button inside the scheduler
onDataRender fires after data has been rendered on the page
onDblClick fires when the user double clicks on an event
onDragEnd fires when the drag/resize operation is finished
onEmptyClick fires when the user clicks on an empty space in the scheduler (not on events)
onEventAdded fires when the user adds a new event to the scheduler
onEventCancel fires when the user clicks on the 'Cancel' button in the lightbox (edit form)
onEventChanged occurs after the user has edited an event and saved the changes (after clicking on the edit and save buttons in the event's bar or in the details window)
onEventCollision fires when the user tries to create a new event (or modify some existing one) inside of some already occupied time slot
onEventCopied fires when the user presses the 'CTRL+C' keyboard command (only with the 'keyboard navigation' extension enabled)
onEventCreated fires when the user starts to create a new event (by double click or dragging)
onEventCut fires when the user presses the 'CTRL+X' keyboard command (only with the 'keyboard navigation' extension enabled)
onEventDeleted fires after the specified event was deleted (version 3.0+)
onEventDrag fires when the user drags/resizes events in the scheduler
onEventDragIn fires when a dragged event is moved over the scheduler
onEventDragOut fires when a dragged event is moved out of the scheduler
onEventDropOut fires when a dragged event is dropped onto the area out of the scheduler
onEventIdChange fires when the id of an event is changed
onEventLoading fires when an event is being loaded from the data source
onEventPasted fires when the user presses the 'CTRL+V' keyboard command
onEventSave fires when the user clicks on the 'save' button in the lightbox (edit form)
onExpand fires when a user clicks on the expand icon to change the scheduler's size from original to 'full screen'.
onExternalDragIn fires when some data is being dragged into the scheduler from an outside DHTMLX component (only with dnd extension enabled)
onLightbox fires after the user has opened the lightbox (edit form)
onLightboxButton fires when the user clicks a custom button in the lightbox
onLimitViolation fires when the user tries to set for an event the time that is currently limited/blocked
onLoadError fires if the scheduler has failed to parse data, or if the server has returned 4xx or 5xx response status
onLocationError fires when the event location can't be found on the map (the Map view only)
onMouseDown fires when the user clicks on a scheduler's element that doesn't have the predefined 'onlick' handler
onMouseMove fires when the mouse cursor is moved over the scheduler
onOptionsLoad fires after a collection of options or sections has been loaded from the server, but isn't parsed yet
onOptionsLoadFinal fires after loading of an options(sections) collection is complete (the Timeline view only)
onOptionsLoadStart fires before a collection of options or sections starts to be loaded from the server (the Timeline view only)
onQuickInfo fires when the pop-up edit form appears
onSaveError fires when some error has happened during data updating
onScaleAdd fires after a single view unit (column, section, day cell etc.) has been rendered in the scheduler
onScaleDblClick fires when the user double clicks on the time scale
onSchedulerReady fires after scheduler initialization is complete, but the scheduler is not rendered on the page yet.
onSchedulerResize fires before the scheduler changes its size
onTemplatesReady fires when the scheduler templates are initialized
onTimelineCreated fires after the Timeline view has been initialized, but is not rendered on the page yet (the Timeline view only)
onViewChange fires after the current view has been changed to some other one
onViewMoreClick fires when the user clicks on the 'View more' link in the Month view (the Month view only)
onXLE fires after loading data from the data source is complete
onXLS fires immediately before loading data from the data source has been started
onXScaleClick fires when the user makes a single click on a cell on the x-axis (the Timeline view only)
onXScaleDblClick fires when the user makes a double click on a cell on the x-axis (the Timeline view only)
onYScaleClick fires when the user makes a single click on a cell on the y-axis (the Timeline view only)
onYScaleDblClick fires when the user makes a double click on a cell on the y-axis (the Timeline view only)
Properties
active_link_view 'says' to present the numbers of days in the Month view as clickable links that open the related day in the specified view
agenda_end sets the date to display events until
agenda_start sets the date to start displaying events from
ajax_error specifies how to display the default error notification in case the XML data loading failed
all_timed 'says' to show multi-day events in the regular way (as one-day events are displayed)
api_date defines the date format for the api_date template
auto_end_date enables automatic changing of the end event date after changing the start date
buttons_left stores a collection of buttons resided in the left bottom corner of the lightbox
buttons_right stores a collection of buttons resided in the right bottom corner of the lightbox
cascade_event_count sets the maximum number of events in a cascade
cascade_event_display sets the 'cascade' display mode
cascade_event_margin sets the left margin for a cascade of events
check_limits activates/disables checking of limits
collision_limit sets the maximum allowable number of events per time slot
container_autoresize forces the scheduler container to automatically change its size to show the whole content without scrolling
day_date sets the date format for the X-Axis of the Week and Units views
dblclick_create enables the possibility to create events by double click
default_date sets the date format used by the templates 'day_date', 'week_date', 'day_scale_date' for setting date in the views' headers
delay_render sets a timeout (in milliseconds) that wraps the updateView and setCurrentView calls (that cause re-drawing of the scheduler)
details_on_create 'says' to use the extended form while creating new events by drag or double click
details_on_dblclick 'says' to open the lightbox after double clicking on an event
display_marked_timespans defines whether the marked(blocked) time spans should be highlighted in the scheduler
displayed_event_color sets the default background color for the events retrieved by the showEvent() method
displayed_event_text_color sets the default font color for the events retrieved by the showEvent() method
drag_create enables the possibility to create new events by drag-and-drop
drag_highlight highlights the event's duration on the time scale when you drags an event over the scheduler
drag_in restrict dragging events to the calling scheduler from any other scheduler(s)
drag_lightbox enables the possibility to drag the lightbox by the header
drag_move enables the possibility to move events by drag-and-drop
drag_out restrict dragging events from the calling scheduler to any other scheduler(s)
drag_resize enables the possibility to resize events by drag-and-drop
edit_on_create 'says' to open the lightbox while creating new events
event_duration sets the initial duration of events in minutes
first_hour sets the minimum value for the hour scale (Y-Axis)
fix_tab_position moves views' tabs from the left to the right side
full_day enables setting of the event's duration to the full day
highlight_displayed_event specifies whether events retrieved by the showEvent method should be highlighted while displaying
hour_date sets the time format of Y-Axis. Also used in the default event and lighbox templates for setting the time part.
hour_size_px sets the height of an hour unit in pixels
icons_edit stores a collection of icons visible in the side edit menu of the event's box
icons_select stores a collection of icons visible in the side selection menu of the event's box
include_end_by defines whether the date specified in the 'End by' field should be exclusive or inclusive
key_nav enables the keyboard navigation in the scheduler
key_nav_step defines the minimal step (in minutes) for navigating events
last_hour sets the maximum value of the hour scale (Y-Axis)
left_border adds the dotted left border to the scheduler
lightbox specifies the lightbox object
lightbox_recurring defines the lightbox's behavior, when the user opens the lightbox to edit a recurring event
limit_drag_out denies to drag events out of the visible area of the scheduler
limit_end sets the right border of the allowable date range
limit_start sets the left border of the allowable date range
limit_time_select sets the max and min values of the time selector in the lightbox to the values of the 'last_hour' and 'first_hour' options
limit_view limits the date period during which the user can view the events
load_date sets the format of server request parameters 'from', 'to' in case of dynamic loading
map_end sets the date to display events until
map_error_position sets the position that will be displayed on the map in case the event's location can't be identified
map_infowindow_max_width the maximum width of the Google Maps's popup marker in the Map view
map_initial_position sets the initial position of the map
map_initial_zoom sets the initial zoom of Google Maps in the Map view
map_resolve_event_location activates attempts to resolve the event's location, if the database doesn't have the event's coordinates stored
map_resolve_user_location enables/disables prompts asking the user to share his location for displaying on the map
map_start sets the date to start displaying events from
map_type sets the type of Google Maps
map_zoom_after_resolve sets the zoom that will be used to show the user's location, if the user agrees to the browser's offer to show it
mark_now enables/disables the marker displaying the current time
max_month_events sets the maximum number of events displayable in a cell
min_grid_size defines the minimal possible size of the Grid view during autoresize
min_map_size defines the minimal possible size of the Map view during autoresize
minicalendar specifies the mini calendar object
month_date sets the format for the header of the Month view
month_day sets the format for the day in the cells of the Month and Year views
month_day_min_height sets the minimum height of cells in the Month view
multi_day enables rendering of multi-day events
multi_day_height_limit sets the height of the area that displays multi-day events
multisection enables the possibility to render the same events in several sections of the Timeline or Units view
multisection_shift_all specifies whether while dragging events that assigned to several sections of the Timeline or Units view, all instances should be dragged at once ('true') or just the selected one ('false')
now_date sets the date for the current-time marker in the Limit extension (enabled by the configuration - mark_now)
occurrence_timestamp_in_utc allows working with recurring events independently of time zones
positive_closing defines the 'saving' behaviour for the case, when the user edits the event's text directly in the event's box
preserve_length preserves the visible length of an event while dragging along a non-linear time scale
preserve_scroll cancels preserving of the current scroll position while navigating between dates of the same view
prevent_cache enables/disables caching of GET requests in the browser
quick_info_detached defines whether the event form will appear from the left/right side of the screen or near the selected event
readonly activates the read-only mode for the scheduler
readonly_form activates the read-only mode for the lightbox
recurring_workdays specifies working days that will affect the recurring event when the user selects the ""Every workday" option in the lightbox
repeat_date sets the date format of the 'End by' field in the 'recurring' lightbox
repeat_precise prevents including past days to events with the 'weekly' recurrence
resize_month_events enables the possibility to resize multi-day events in the Month view by drag-and-drop
resize_month_timed enables the possibility to resize single-day events in the Month view by drag-n-drop
scroll_hour sets the initial position of the vertical scroll in the scheduler (an hour in the 24-hour clock format)
section_delimiter specifies the delimeter that will be used to separate several sections/units in the related data property of the event
select shows/hides the select bar in the event's box
separate_short_events allows preventing short events from overlapping
server_utc enables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server
show_loading enables showing a progress/spinner while data is loading (useful for dynamic loading)
show_quick_info activates/disables the 'quick_info' extension (pop-up task's details form)
start_on_monday sets the start day of weeks
time_step sets the minimum step (in minutes) for event's time values
timeline_swap_resize defines that during event resizing the end date of the event can be swapped for the start date (after the end date becomes scheduled before the start one)
touch enables/disables the touch support in the scheduler
touch_drag defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture
touch_tip enables/disables prompting messages in the right top corner of the screen
touch_tooltip disables dhtmxlScheduler's tooltips on the touch devices
update_render updates the mode when the scheduler fully repaints itself on any action
use_select_menu_space defines that events occupy the whole width of the cell
wai_aria_application_role defines whether role="application" will be used for the main scheduler container and minicalendar elements
wai_aria_attributes enables WAI-ARIA support to make the component recognizable for screen readers
week_date sets the format of the date in the sub-header of the Month view
wide_form enables/disables displaying the standard (wide) lightbox instead of the short one
xml_date sets the date format that is used to parse data from the data set
year_x sets the number of rows in the Year view
year_y sets the number of columns in the Year view
Templates
agenda_date specifies the date in the header of the view
agenda_text specifies the text in the second column of the Agenda view
agenda_time specifies the date in the first column of the Agenda view
api_date specifies the format of dates that are set by means of API methods. Used to parse incoming dates
calendar_date specifies the format of the date in a cell
calendar_month specifies the date in the header of the calendar
calendar_scale_date specifies the day name in the week sub-header of the view
calendar_time specifies the date format of the lightbox's start and end date inputs
day_date specifies the date in the header of the Day and Units views
day_scale_date specifies the date in the sub-header of the Day view
drag_marker_class specifies the CSS class that will be applied to the highlighted event's duration on the time scale
drag_marker_content specifies the content of the highlighted block on the time scale
event_bar_date specifies the date of an event. Applied to one-day events only
event_bar_text specifies the event's text. Applied to multi-day events only
event_class specifies the CSS class that will be applied to the event's container
event_date specifies the time part of the start and end dates of the event. Mostly used by other templates for presenting time periods
event_header specifies the event's header
event_text specifies the event's text
hour_scale specifies the items of the Y-Axis
load_format specifies the format of requests in the dynamic loading mode
map_date specifies the date in the header of the view
map_text specifies the text in the second column of the view
map_time specifies the date in the first column of the view
marker_date specifies the date of the event in the Google Maps popup marker
marker_text specifies the text of the event in the Google Maps popup marker
month_date specifies the date in the header of the view
month_date_class specifies the CSS class that will be applied to a day cell
month_day specifies the format of the day in a cell
month_events_link specifies the presentation of the 'View more' link in the cell of the Month view
month_scale_date specifies the date format of the X-Axis of the view
quick_info_content specifies the content of the pop-up edit form
quick_info_date specifies the date of the pop-up edit form
quick_info_title specifies the title of the pop-up edit form
time_picker specifies the drop-down time selector in the lightbox
tooltip_date_format specifies the format of start and end dates displayed in the tooltip
tooltip_text specifies the text of tooltips
week_agenda_event_text specifies the event's text
week_agenda_scale_date the date of a day cell of the view
week_date specifies the date in the header of the view
week_date_class specifies the CSS class that will be applied to a day cell
week_scale_date specifies the date in the sub-header of the view
xml_date a string from an XML file is converted into a date object in conformity with this template
xml_format a date object is converted into a string in conformity with this template. Used to send data back to the server
year_date specifies the date in the header of the view
year_month specifies the month's name in the header of a month block of the view.
year_scale_date specifies the day's name in the sub-header of a month block of the view
year_tooltip specifies the tooltip over a day cell containing some scheduled event(s)
lightbox_header specifies the lightbox's header
{gridName}_date specifies the date in the header of the view
{gridName}_full_date specifies the format of dates in columns with id='date'
{gridName}_single_date specifies the format of dates in columns with id='start_date' or id='end_date'
{gridName}_field specifies the text in the columns
{timelineName}_cell_value specifies the number of scheduled events in a cell of the view
{timelineName}_cell_class specifies the CSS class that will be applied to a cell of the view
{timelineName}_scalex_class specifies the name of a CSS class that will be applied to items of the X-Axis
{timelineName}_second_scalex_class specifies the name of a CSS class that will be applied to items of the second X-Axis
{timelineName}_scaley_class specifies the name of a CSS class that will be applied to items of the Y-Axis
{timelineName}_scale_label specifies items of the Y-Axis
{timelineName}_tooltip specifies the tooltip over a day cell containing some scheduled event(s)
{timelineName}_date specifies the date in the header of the view
{timelineName}_scale_date specifies items of the X-Axis
{timelineName}_second_scale_date specifies items of the second X-Axis
{unitsName}_date specifies the date in the header of the view
{unitsName}_scale_text specifies items of the X-Axis
Other
config defines configuration options for dates, scale, controls
date a set of date formatting methods
ical specifies ICal serialization and parsing
json specifies JSON serialization and parsing
keys defines the hot keys for the scheduler
locale a locale object (region-specific labels) of the scheduler
matrix stores the configuration objects of all timelines specified on the page
skin returns the current skin of the scheduler
templates defines formatting of the templates for dates, titles and tooltips in the scheduler
version returns the version of dhtmlxScheduler
xy specifies sizes of the scheduler's elements
Back to top