Interface SchedulerStatic

Index

Properties

Methods

Properties

public config: SchedulerConfigOptions

public date: SchedulerDateHelpers

public keys: SchedulerHotkeys

public locale: SchedulerLocale

public skin: String

public templates: SchedulerTemplates

public version: String

public xy: SchedulerSizes

Methods

public addEvent(event: any): string

adds a new event

Parameters

  • event: any

    the event object

Returns

string

public addEventNow(event: any): string

adds a new event and opens the lightbox to confirm

Parameters

  • event: any

    the event object

Returns

string

public addMarkedTimespan(config: any): any

marks dates but with certain settings makes blocking (unlike blockTime() allows setting custom styling for the limit)

Parameters

  • config: any

    the configuration object of the timespan to mark/block

Returns

any

public addSection(section: any, parent_id: string): boolean

adds a section to the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)

Parameters

  • section: any

    the object of the section to add

  • parent_id: string

    the id of the parent section. Pass 'null' if you are adding a section to the root

Returns

boolean

public attachEvent(name: string, handler: (...args: any[]) => any): string

attaches the handler to an inner event of dhtmlxScheduler

Parameters

  • name: string

    the event name, case-insensitive

  • handler: (...args: any[]) => any

    the handler function

Returns

string

public backbone(events: any): any

makes the scheduler reflect all data changes in the Backbone model and vice versa

Parameters

  • events: any

    the Backbone data collection

Returns

any

public blockTime(date: any, time_points: any, items?: any): any

blocks the specified date and applies the default 'dimmed' style to it.

Parameters

  • date: any

    a date to block ( if a number is provided, the parameter will be treated as a week day: '0' index refers to Sunday, '6' - to Saturday)

  • time_points: any

    an array [start_minute,end_minute,..,start_minute_N,end_minute_N] where each pair sets a certain limit range. The array can have any number of such pairs

  • items?: any optional

    defines specific items of view(s) to block

Returns

any

public callEvent(name: string, params: any): boolean

calls an inner event

Parameters

  • name: string

    the event name, case-insensitive

  • params: any

    an array of the event related data

Returns

boolean

public changeEventId(id: string, new_id: string): any

changes the event id

Parameters

  • id: string

    the current event id

  • new_id: string

    the new event id

Returns

any

public checkCollision(event: any): boolean

checks whether the specified event occurs at the time that has been already occupied with another event(s)

Parameters

  • event: any

    the event object

Returns

boolean

public checkEvent(name: string): boolean

checks whether an event has some handler(s) specified

Parameters

  • name: string

    the event name

Returns

boolean

public checkInMarkedTimespan(event: any, timespan: string): boolean

checks whether an event resides in a specific timespan

Parameters

  • event: any

    the event object

  • timespan: string

    the timespan type

Returns

boolean

public checkLimitViolation(event: any): boolean

checks whether the specified event takes place at the blocked time period

Parameters

  • event: any

    the event object

Returns

boolean

public clearAll(): any

removes all events from the scheduler

Returns

any

public closeAllSections(): any

closes all sections in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)

Returns

any

public closeSection(section_id: string): any

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)

Parameters

  • section_id: string

    the section id

Returns

any

public collapse(): any

collapses the expanded scheduler back to the normal size

Returns

any

public createGridView(config: any): any

creates the Grid view in the scheduler

Parameters

  • config: any

    the configuration object of the Grid view

Returns

any

public createTimelineView(config: any): any

creates the Timeline view in the scheduler

Parameters

  • config: any

    the configuration object of the Timeline view

Returns

any

public createUnitsView(config: any): any

creates the Units view in the scheduler

Parameters

  • config: any

    the configuration object of the Units view

Returns

any

public deleteAllSections(): any

deletes all sections from the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)

Returns

any

public deleteEvent(id: any): any

deletes the specified event

Parameters

  • id: any

    the event id

Returns

any

public deleteMarkedTimespan(id: string): any

removes marking/blocking set by the addMarkedTimespan() and blockTime() methods

Parameters

  • id: string

    the timespan id

Returns

any

public deleteSection(section_id: string): boolean

deletes a section from the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)

Parameters

  • section_id: string

    the section id

Returns

boolean

public destroyCalendar(name?: any): any

destroys previously created mini-calendar

Parameters

  • name?: any optional

    the mini-calendar's object (if not specified, the scheduler attempts to destroy the last created mini calendar)

Returns

any

public detachEvent(id: string): any

detaches a handler from an event (which was attached before by the attachEvent method)

Parameters

  • id: string

    the event id

Returns

any

public edit(id: string): any

opens the inline editor to alter the event text (the editor in the event box)

Parameters

  • id: string

    the event id

Returns

any

public editStop(id: string): any

closes the inline event edotor if it's currently open

Parameters

  • id: string

    the event id

Returns

any

public endLightbox(mode: boolean, box: HTMLElement): any

closes the lightbox

Parameters

  • mode: boolean

    if set to true, the changes made in the lightbox will be saved before closing. If - false, the changes will be cancelled.

  • box: HTMLElement

    the HTML container for the lightbox

Returns

any

public expand(): any

expands the scheduler to the full screen view

Returns

any

public formSection(name: string): any

gives access to the objects of lightbox's sections

Parameters

  • name: string

    the name of a lightbox section

Returns

any

public getActionData(e: Event): any

returns the current cursor-pointed date and section (if defined)

Parameters

  • e: Event

    a native event object

Returns

any

public getEvent(event_id: any): any

return the event object by its id

Parameters

  • event_id: any

    event_id

Returns

any

public getEventEndDate(id: string): Date

gets the event's end date

Parameters

  • id: string

    the event id

Returns

Date

public getEventStartDate(id: string): Date

gets the event's start date

Parameters

  • id: string

    the event id

Returns

Date

public getEventText(id: string): string

gets the event's text

Parameters

  • id: string

    the event id

Returns

string

public getEvents(from?: Date, to?: Date): any

returns a collection of events which occur during the specified period

Parameters

  • from?: Date optional

    the start date of the period

  • to?: Date optional

    the end date of the period

Returns

any

public getLabel(property: string, key: any): any

gets the label of a select control in the lighbox

Parameters

  • property: string

    the name of a data property that the control is mapped to

  • key: any

    the option id. This parameter is compared with the event data property to assign the select's option to an event

Returns

any

public getLightbox(): HTMLElement

gets the lightbox's HTML object element

Returns

HTMLElement

public getRecDates(id: string, number: number): any

returns all occurrences of a recurring event

Parameters

  • id: string

    the id of a recurring event

  • number: number

    the maximum number of occurrences to return (by default, 100)

Returns

any

public getRenderedEvent(id: string): HTMLElement

gets the object of the currently displayable event

Parameters

  • id: string

    the event id

Returns

HTMLElement

public getSection(section_id: string): any

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)

Parameters

  • section_id: string

    the section id

Returns

any

public getState(): any

gets the current state of the scheduler

Returns

any

public getUserData(id: string, name: string): any

gets the user data associated with the specified event

Parameters

  • id: string

    the event id

  • name: string

    the user data name

Returns

any

public hideCover(box?: HTMLElement): any

hides the lightbox modal overlay that blocks interactions with the remaining screen

Parameters

  • box?: HTMLElement optional

    an element to hide

Returns

any

public hideQuickInfo(): any

hides the pop-up event form (if it's currently active)

Returns

any

public init(container: any, date?: Date, view?: string): any

initializes an instance of dhtmlxScheduler

Parameters

  • container: any

    the id or object of the HTML container that the scheduler will be created inside

  • date?: Date optional

    the initial date of the scheduler (by default, the current date)

  • view?: string optional

    the name of the initial view (by default, "week")

Returns

any

public invertZones(zones: any): any

inverts the specified time zones

Parameters

  • zones: any

    an array [start_minute,end_minute,..,start_minute_N,end_minute_N] where each pair sets a certain limit range (in minutes). The array can have any number of such pairs

Returns

any

public isCalendarVisible(): any

checks whether the calendar is currently open in the scheduler

Returns

any

public isOneDayEvent(event: any): boolean

checks whether the specified event one-day or multi-day

Parameters

  • event: any

    the event object

Returns

boolean

public linkCalendar(calendar: any, shift: (...args: any[]) => any): any

'says' to change the active date in the mini calendar each time the active date in the scheduler is changed

Parameters

  • calendar: any

    the mini calendar object

  • shift: (...args: any[]) => any

    a function that defines the difference between active dates in the mini-calendar and the scheduler. The function takes the scheduler's date as a parameter and returns the date that should be displayed in the mini calendar

Returns

any

public load(url: string, type?: string, callback?: (...args: any[]) => any): any

loads data to the scheduler from an external data source

Parameters

  • url: string

    the server side url (may be a static file or a server side script which outputs data as XML)

  • type?: string optional

    ('json', 'xml', 'ical') the data type. The default value - 'xml'

  • callback?: (...args: any[]) => any optional

    the callback function

Returns

any

public markCalendar(calendar: any, date: Date, css: string): any

applies a css class to the specified date

Parameters

  • calendar: any

    the calendar object

  • date: Date

    the date to mark

  • css: string

    the name of a css class

Returns

any

public markTimespan(config: any): any

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

Parameters

  • config: any

    the configuration object of the timespan to mark/block

Returns

any

public openAllSections(): any

opens all sections in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored)

Returns

any

public openSection(section_id: string): any

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)

Parameters

  • section_id: string

    the section id

Returns

any

public parse(data: any, type?: string): any

loads data from a client-side resource

Parameters

  • data: any

    a string or object which represents data

  • type?: string optional

    ('json', 'xml', 'ical') the data type. The default value - 'xml'

Returns

any

public renderCalendar(config: any): any

creates a mini calendar

Parameters

  • config: any

    the calendar configuration object

Returns

any

public renderEvent(container: HTMLElement, event: any): boolean

generates the HTML content for a custom event box

Parameters

  • container: HTMLElement

    the event container

  • event: any

    the event object

Returns

boolean

public resetLightbox(): any

removes the current lightbox's HTML object element

Returns

any

public scrollUnit(step: number): any

scrolls the specified number of units in the Units view

Parameters

  • step: number

    the number of units to scroll (set the positive value to scroll units in the right direction, the negative value - in the left direction).

Returns

any

public select(id: string): any

selects the specified event

Parameters

  • id: string

    the event id

Returns

any

public serverList(list_name: string, options?: any): any

returns a list of options

Parameters

  • list_name: string

    the name of a list

  • options?: any optional

    an array of options

Returns

any

public setCurrentView(date?: Date, view?: string): any

displays the specified view and date

Parameters

  • date?: Date optional

    the date to display

  • view?: string optional

    the name of a view to display

Returns

any

public setEvent(id: any, event: any): any

adds a new event to the scheduler's data pool

Parameters

  • id: any

    the event id

  • event: any

    the event object

Returns

any

public setEventEndDate(id: string, date: Date): any

sets the event's end date

Parameters

  • id: string

    the event id

  • date: Date

    the new end date of the event

Returns

any

public setEventStartDate(id: string, date: Date): any

set the event's start date

Parameters

  • id: string

    the event id

  • date: Date

    the new start date of the event

Returns

any

public setEventText(id: string, text: string): any

set the event's text

Parameters

  • id: string

    the event id

  • text: string

    the new text of the event

Returns

any

public setLightboxSize(): any

forces the lightbox to resize

Returns

any

public setLoadMode(mode: string): any

sets the mode that allows loading data by parts (enables the dynamic loading)

Parameters

  • mode: string

    the loading mode

Returns

any

public setUserData(id: string, name: string, value: any): any

sets the user data associated with the specified event

Parameters

  • id: string

    the event id

  • name: string

    the user data name

  • value: any

    the user data value

Returns

any

public showCover(box?: HTMLElement): any

shows the lightbox modal overlay that blocks interactions with the remaining screen

Parameters

  • box?: HTMLElement optional

    an element to hide

Returns

any

public showEvent(id: string, view?: string): any

shows and highlights the specified event in the current or specified view

Parameters

  • id: string

    the event id

  • view?: string optional

    the view name

Returns

any

public showLightbox(id: string): any

opens the lightbox for the specified event

Parameters

  • id: string

    the event id

Returns

any

public showQuickInfo(id: string): any

displays the pop-up event form for the specified event

Parameters

  • id: string

    the event id

Returns

any

public startLightbox(id: string, box: HTMLElement): any

shows a custom lightbox in the specified HTML container centered on the screen

Parameters

  • id: string

    the event id

  • box: HTMLElement

    the lightbox's HTML container

Returns

any

public toICal(header?: string): string

convers scheduler's data to the ICal format

Parameters

  • header?: string optional

    sets the value for the content header field

Returns

string

public toJSON(): string

converts scheduler's data into the JSON format

Returns

string

public toPDF(url: string, mode?: string): any

exports the current view to a PDF document (can be used for printing)

Parameters

  • url: string

    the path to the server-side PDF converter

  • mode?: string optional

    the color map of the resulting PDF document

Returns

any

public toPDFRange(from: Date, to: Date, view: string, path: string, color: string): any

exports several scheduler's views to a PDF document (can be used for printing)

Parameters

  • from: Date

    the date to start export events from

  • to: Date

    the date to export events until

  • view: string

    the name of a view that the export should be applied to

  • path: string

    the path to the php file which generates a PDF file (details)

  • color: string

    the color map in use

Returns

any

public toXML(): string

converts scheduler's data into the XML format

Returns

string

public uid(): any

generates an unique ID (unique inside the current scheduler, not GUID)

Returns

any

public unblockTime(days: any, zones?: any, sections?: any): any

removes blocking set by the blockTime() method

Parameters

  • days: any

    (Date, number,array, string) days that should be limited

  • zones?: any optional

    the period in minutes that should be limited. Can be set to 'fullday' value to limit the entire day

  • sections?: any optional

    allows blocking date(s) just for specific items of specific views. BTW, the specified date(s) will be blocked just in the related view(s)

Returns

any

public unmarkCalendar(calendar: any, date: Date, css: string): any

removes a css class from the specified date

Parameters

  • calendar: any

    the mini calendar object

  • date: Date

    the date to unmark

  • css: string

    the name of a css class to remove

Returns

any

public unmarkTimespan(divs: any): any

removes marking/blocking set by the markTimespan() method

Parameters

  • divs: any

    a timespan to remove marking/blocking from (or an array of timespans)

Returns

any

public unselect(id?: string): any

unselects the specified event

Parameters

  • id?: string optional

    the event id (if not specified, the currently selected event will be unselected)

Returns

any

public updateCalendar(calendar: any, new_date: Date): any

displays the specified date in the mini calendar

Parameters

  • calendar: any

    the mini calendar object

  • new_date: Date

    a new date to display in the mini calendar

Returns

any

public updateCollection(collection: string, options: any): boolean

updates tht specified collection with new options

Parameters

  • collection: string

    the name of the collection to update

  • options: any

    the new values of the collection

Returns

boolean

public updateEvent(id: string): any

updates the specified event

Parameters

  • id: string

    the event id

Returns

any

public updateView(date: Date, view: string): any

displays the specified view and date (doesn't invokes any events)

Parameters

  • date: Date

    the date to set

  • view: string

    the view name

Returns

any