Schedule class

Schedule(client, oOptionsopt)

new Schedule(client, oOptionsopt)

The ExSchedule/JS component provides scheduling of appointments in your application. Features include:
  • Groups support (group or filter the events)
  • Repetitive events support
  • and much more
The ExSchedule/JS is a HTML standalone-component, written in JavaScript, that uses no third-party libraries.

Every option of the Schedule.Options type has associated a property of the control. For instance, the option:

allowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
is associated with the property:
AllowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
which means that the following statements are equivalent:
oSchedule.Options = {allowActions: "scroll"}
oSchedule.SetOptions({allowActions: "scroll"})
oSchedule.AllowActions = "scroll"
oSchedule.SetAllowActions("scroll")
where oSchedule is an object of Schedule type
Parameters:
Name Type Attributes Description
client any The client parameter indicates the control's client area as:
  • array of [x,y,width,height] type that specifies the control's client area
  • string, that specifies the identifier of the canvas within the document, so the canvas's client area becomes the control's client area
  • HTMLCanvasElement, that specifies the identifier of the canvas within the document, so the canvas's client area becomes the control's client area
oOptions object <optional>
An object of Schedule.Options type that defines different options to display the control.
Requires:
  • module:exontrol.commmon.min.js
  • module:exontrol.calendar.min.js
  • module:exontrol.menu.min.js
  • module:exontrol.icalendar.min.js
Schedule

Requires

  • module:exontrol.commmon.min.js
  • module:exontrol.calendar.min.js
  • module:exontrol.menu.min.js
  • module:exontrol.icalendar.min.js

Classes

Options

Members

CanRedo

The CanRedo() method indicates whether the control can perform a Redo operation.
Since:
  • 2.1
Example
false {boolean}, no Redo operation is permitted
  true {boolean}, a Redo operation is available
CanRedo

CanUndo

The CanUndo() method indicates whether the control can perform an Undo operation.
Since:
  • 2.1
Example
false {boolean}, no Undo operation is permitted
  true {boolean}, an Undo operation is available
CanUndo

EndBlockUndoRedo

The EndBlockUndoRedo() method ends recording the Undo/Redo operations as a block. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block. The AllowUndoRedo property enables or disables the Undo/Redo feature.
Since:
  • 2.1
Example
oControl.StartBlockUndoRedo()
   ...
 oControl.EndBlockUndoRedo()
EndBlockUndoRedo

GetAllowUndoRedo

The GetAllowUndoRedo() method specifies whether the Undo/Redo feature is enabled or disabled. To undo an action you need to press Ctrl+Z, while for to redo something you've undone, press Ctrl+Y.
Since:
  • 2.1
Example
false {boolean}, the Undo/Redo feature is disabled (by default)
  true {boolean}, the Undo/Redo feature is enabled.
GetAllowUndoRedo

GetUndoRedoQueueLength

The GetUndoRedoQueueLength() method gets the maximum number of Undo/Redo actions that may be stored to the control's Undo/Redo queue.
Since:
  • 2.1
Example
-1 {number}, the Undo/Redo queue is limitless
  1 {number}, the Undo/Redo queue limits the number of actions to store to 1 (one action or one block of actions)
GetUndoRedoQueueLength

Listeners :exontrol.Lts

The Listeners field defines the events of the control, as an object of exontrol.Lts type. The exontrol.Lts type supports forEach(callback, thisArg) method that helps you to enumerate the events the control supports. The Events section lists the events the component supports.
Type:
  • exontrol.Lts
Example
The following sample shows how you can get all events the component currently supports:

oSchedule.Listeners.forEach(function(name)
{
 console.log(name);
});

The following sample displays information about the event being clicked:

oSchedule.Listeners.Add("onclick", function (oEvent)
{
 console.log(oEvent);
});

where oSchedule is an object of Schedule type
Listeners

Redo

The Redo() method redoes the last action that was undone (reverses the Undo method). The Undo and Redo features let you remove or repeat single or multiple UI actions, but all actions must be undone or redone in the order you did or undid them – you can't skip actions.
Since:
  • 2.1
Example
Redo(), redoes the last action that was undone
Redo

SetAllowUndoRedo

The SetAllowUndoRedo() method enables or disables the Undo/Redo feature (by default the Undo/Redo feature is disabled). The Undo and Redo features let you remove or repeat single or multiple actions, but all actions must be undone or redone in the order you did or undid them – you can't skip actions. For example, if you added three event (calendar appointment)s and then decide you want to undo the first change you made, you must undo all three changes. To undo an action you need to press Ctrl+Z, while for to redo something you've undone, press Ctrl+Y.
Since:
  • 2.1
Example
false {boolean}, the Undo/Redo feature is disabled (by default)
  true {boolean}, enables the Undo/Redo feature.
SetAllowUndoRedo

SetUndoRedoQueueLength

The SetUndoRedoQueueLength() method limits the Undo/Redo queue.
Since:
  • 2.1
Example
-1 {number}, the Undo/Redo queue is limitless
  1 {number}, the Undo/Redo queue limits the number of actions to store to 1 (one action or one block of actions)
SetUndoRedoQueueLength

Shortcuts :exontrol.Sts

The Shortcuts field defines the shortcuts of the control, as an object of exontrol.Sts type. In order to provide keyboard support for the component, the owner <canvas> element must include the tabIndex attribute, as <canvas ... tabIndex="0">. You can associated a function or a callback to any shortcut.
Type:
  • exontrol.Sts
Example
The following sample removes the selection (calls the RemoveSelection() method) once the user presses the Delete key:

oSchedule.Shortcuts.Add( "Delete", oSchedule.RemoveSelection, oSchedule );

where oSchedule is an object of Schedule type
Shortcuts

StartBlockUndoRedo

The StartBlockUndoRedo() method records all next Undo/Redo operations into a block until the EndBlockUndoRedo method is called. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block. The AllowUndoRedo property enables or disables the Undo/Redo feature.
Since:
  • 2.1
Example
oControl.StartBlockUndoRedo()
   ...
 oControl.EndBlockUndoRedo()
StartBlockUndoRedo

Undo

The Undo() method undoes the last action or a sequence of actions. For instance, if an event (calendar appointment) has been moved, Undo means moves back the event (calendar appointment) to its position before move. The Undo and Redo features let you remove or repeat single or multiple UI actions, but all actions must be undone or redone in the order you did or undid them – you can't skip actions.
Since:
  • 2.1
Example
Undo(), undoes the last control operation
Undo

oSV :SV

The oSV field defines the base schedule-view of control. Use the AddScheduleView() method to add a new view to the control. Use the RemoveScheduleView() method removes a schedule-view already created by AddScheduleView() method.
Type:
oSV

(static, readonly) EventResizableEnum :number

The Schedule.EventResizableEnum type indicates the margins of the events that can be resized. The Resizable event property indicates the margins of the event that user can resize at runtime.
Type:
  • number
Properties:
Name value Type Description
exNoResizable 0 number The exNoResizable field indicates that the event can not be resized.
exResizableStart 1 number The exResizableStart field indicates that only the starting point of the event can be resized.
exResizableEnd 2 number The exResizableEnd field indicates that only the ending point of the event can be resized.
exResizableBoth 3 number The exResizableBoth field indicates a sizeable event, so the user can resize at runtime the start or end point of the event.

(static, readonly) OnResizeControlEnum :number

The Schedule.OnResizeControlEnum type defines the options to specify what the control does when the control or a portion of the control is resized.
Type:
  • number
Properties:
Name value Type Description
exResizePanelLeft 0 number The exResizePanelLeft value specifies that the left panel of the control is resized, once the entire-control gets resized. If this flag is set the calendar view is resized once the control is resized, unless the exChangePanels flag is set, as the schedule will be resized.
exResizePanelRight 1 number The exResizePanelRight value specifies that the right panel of the control is resized, once the entire-control gets resized. If this flag is set the schedule view is resized once the control is resized, unless the exChangePanels flag is set, as the calendar will be resized.
exDisableSplitter 128 number The exDisableSplitter flag disables the splitter, so the user can not resize the panels using the control's vertical split bar.
exHideSplitter 256 number The exHideSplitter flag hides the splitter. This flag allows you to display a single panel, the calendar or the schedule view at once. If the exHideSplitter is used in combination with the exChangePanels, the schedule view is shown only, else the calendar panel is displayed only
exChangePanels 512 number The exChangePanels flag exchanges the content of the panels. If this flag is present, the schedule view is displayed on the left, while the calendar panel is shown on the right side of the component.
exCalendarFit 1024 number The exCalendarFit flag ensures that the calendar fits to the panel that hosts it. If this flag is present, the Calendar panel can not show its content partially.
exCalendarAutoHide 2048 number The exCalendarAutoHide flag turns on or off the calendar panel when the cursor leaves the panels. The auto hide feature allows you to hide the calendar panel, while the cursor is not in it, so the schedule view gains the entire client area.

(static, readonly) OnSelectDateEnum :number

The Schedule.OnSelectDateEnum type specifies the action the control performs once a new date is selected in the calendar panel. The OnSelectDate property indicates the operation to perform when user selects a new date in the calendar panel.
Type:
  • number
Properties:
Name value Type Description
exFitSelToView -1 number The exFitSelToView value specifies that once the selection is changed within the calendar panel, the day's size is updated and the view is scrolled to fit the calendar's selection (default).
exNoViewChange 0 number The exNoViewChange value indicates that no change occurs once the user changes the selection within the calendar panel.
exEnsureVisibleDate 1 number The exEnsureVisibleDate value specifies that once the selection is changed within the calendar panel, the view is scrolled to ensure that the calendar's selected date fits the schedule view

(static, readonly) ShowViewCompactEnum :number

The Schedule.ShowViewCompactEnum type indicates the way the control displays the dates within the schedule panel. The ShowViewCompact property specifies the way the control arranges the dates in the schedule view.
Type:
  • number
Properties:
Name value Type Description
exViewCalendar 0 number The exViewCalendar value indicates that the schedule view arranges the days as they are shown in the calendar panel.
exViewCalendarCompact -1 number The exViewCalendarCompact value indicates that the schedule view arranges the days as they are shown in the calendar panel, excepts that the first day of the month starts right after the last day of the previously month, or start to a new row (default).
exViewSingleRow 1 number The exViewSingleRow value indicates that the schedule view arranges all days to a single row (horizontally).
exViewSingleColumn 2 number The exViewSingleColumn value indicates that the schedule view arranges all days to a single column (vertically).
exViewSingleRowLockHeader 3 number The exViewSingleRowLockHeader value indicates that schedule view arranges all days to a single row (horizontally), while the date header is shown/locked on the top while the chart is vertically scrolled.

(static, readonly) SingleSelEnum :number

The Schedule.SingleSelEnum type defines flags the singleSel/SetSingleSel/GetSingleSel method uses.
Type:
  • number
Properties:
Name value Type Description
exDisableSel 0 number The exDisableSel value specifies that the control's selection is disabled.
exEnableSel 1 number The exEnableSel flag specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set ).
exSingleSel 2 number The exSingleSel flag specifies that the user can select a event only.
exToggleSel 4 number The exToggleSel flag specifies that the event's selection state is toggled once the user clicks a event.
exDisableCtrlSel 8 number The exDisableCtrlSel flag disables toggling the event's selection state when user clicks a event, while CTRL modifier key is pressed.
exDisableShiftSel 16 number The exDisableShiftSel flag disables selecting events using the SHIFT key.
exDisableDrag 32 number The exDisableDrag flag disables selecting events by drag.

(static) type :string

The type field defines the full-name of the object (the constructor.name does not give the same name for minimized forms). The Schedule.type member always returns "Schedule"
Type:
  • string
Since:
  • 1.8

(static) version :string

The version field defines the version of the control. The current version is 3.0
Type:
  • string

Methods

AddScheduleView(name, attributesopt) → {SV}

The AddScheduleView() method creates a new view to display the events. Use the RemoveScheduleView() method removes a schedule-view already created by AddScheduleView() method.
Parameters:
Name Type Attributes Description
name string defines the name of the schedule-view to be created. It must be an unique name. The "schedule" defines the control's default-schedule view, and it is reserved. If missing, the "schedule.split" is used instead
attributes exontrol.W.Options <optional>
A exontrol.W.Options that defines the attributes of the window
Properties
Name Type Description
Visible boolean The Visible field indicates whether the window is visible or hidden.
VisibleExtends string The VisibleExtends field specifies the list of windows the current window depends to be visible or hidden. A string expression that specifies the list of windows the current window's visibility depends on as explained:
  • if the VisibleExtends property includes the window itself, the window is visible if any window in VisibleExtends is visible, else
  • if the VisibleExtends property does NOT includes the window itself, the window is hidden if any window in VisibleExtends is hidden (or the window is visible if all VisibleExtends windows are visible)
AllowKeys boolean The AllowKeys field specifies whether the window can receive the Keys events. By default, only the canvas window receives all the keys.
Enabled boolean The Enabled field specifies whether the window is enabled or disabled (the window is protected and shown in gray).
Resizable boolean The Resizable field indicates whether the window is resizable or fixed.
Locked boolean The Locked field specifies that the window is locked (the window is protected).
Dock exontrol.WDT The Dock field specifies how the control borders are docked to its parent control and determines how a control is resized with its parent. The exontrol.WDT type supports the following values:
  • N(0), the window is not docked (none)
  • T(1), the window's top edge is docked to the top of its containing window (top)
  • B(2), the window's bottom edge is docked to the bottom of its containing window (bottom)
  • L(3), the window's left edge is docked to the left edge of its containing window (left)
  • R(4), the window's right edge is docked to the right edge of its containing window (right)
  • F(5), all the window's edges are docked to all edges of its containing window and sized appropriately (fill)
Size number The Size field defines the width/height of the window when it is docked.
SizeExtends string The SizeExtends field specifies the list of windows that shares the same size. Once a window is resized, all its SizeExtends windows are sized the same as the current one.
Client Array.<number> The Client field specifies position of the window relative to the parent window, as an array of [x,y,width,height] type.
Background string The Background field defines the window's background color ( CSS Color ) or null/undefined if not provided.
Foreground string The Foreground field defines the window's foreground color ( CSS Color ) or null/undefined if not provided.
Opacity number The Opacity field indicates the window's opacity, as a number between 0 and 1 (1 is not transparent at all, 0.5 is 50% see-through, and 0 is completely transparent)
HoverBackground string The HoverBackground field, defines the window's background color while the cursor hovers it ( CSS Color ) or null/undefined if not provided
HoverForeground string The HoverForeground field defines the window's foreground color while the cursor hovers it( CSS Color ) or null/undefined if not provided
HoverOpacity number The HoverOpacity field indicates the window's opacity, as a number between 0 and 1 (1 is not transparent at all, 0.5 is 50% see-through, and 0 is completely transparent), when the cursor hovers it
DrawWindowFrame boolean The DrawWindowFrame field indicates whether the window draws its frame.
Extends string The Extends field indicates a list of windows separated by comma character to extend the current's client area to. The windows(child windows) must have the z-order greater than the z-order of the current window, else they will be ignored. The Extends field changes the z-order of the windows as well.
HoverExtends string The HoverExtends field specifies the list of windows separated by comma character that receives the hover-events once the cursor hovers the current window.
AllowXChg boolean The AllowXChg field specifies whether the window can exchange its UI position with another window. Only windows with AllowXChg field set can be exchanged.
XChgID string The XChgID field specifies the general expression, whose evaluated result defines the caption to be displayed on the window's anchor-exchange part. The expression supports keywords like index, name and shortname, that indicates the window's index, a value starting from 0, the window's name and short-name. The evaluated result can include exontrol's HTML tags that will be applied on the window's anchor-exchange element. If the expression is not valid, the XChgID value is used as it is.
Control object The Control field defines the control associated with the window (for internal use only).
HScroll string The HScroll field defines window's horizontal scroll bar. A string expression that indicates the name of the window that hosts an exontrol.SB control or an object of exontrol.SB type that defines the window's horizontal scroll bar (for internal use only).
VScroll string The VScroll field defines window's vertical scroll bar. A string expression that indicates the name of the window that hosts an exontrol.SB control or an object of exontrol.SB type that defines the window's vertical scroll bar (for internal use only).
Layout string The Layout field defines the properties (separated by comma) the GetLayout/SetLayout methods of CW saves/restores (for internal use only).
Returns:
Returns the newly created view as an object of SV type. Returns null, in case there is already a window with specified name.
Type
SV
Example
oSchedule.AddScheduleView("2nd",{Background: "black", Foreground: "white", Dock: 3}), adds a new schedule-view panel, docked to the left-size, with a black-background and a white-foreground
AddScheduleView

BeginUpdate()

The BeginUpdate() method suspends the control's render until the EndUpdate() method is called. It maintains performance, while multiple changes occurs within the control. You can use the Update() method to perform multiple changes at once.
BeginUpdate

BlockUndoRedo(callback, thisArg)

The BlockUndoRedo() method records the Undo/Redo operations as a block. The BlockUndoRedo() method calls StartBlockUndoRedo / EndBlockUndoRedo methods.
Parameters:
Name Type Description
callback callback Specifies a function of callback() type
thisArg any Indicates the value of "this" keyword during the callback, or the control itself if missing
BlockUndoRedo

Clear()

The Clear() method clears the events, groups and mark-zones
Since:
  • 2.1
Clear

EndUpdate()

The EndUpdate() method resumes the control's render, after it is suspended by the BeginUpdate() method.
EndUpdate

Event(id) → {Event}

The Event() method returns the event based on its index or identifier/key. The Event(id) method is equivalent with Event(id) method of the Events object
Parameters:
Name Type Description
id any The event parameter could be any of the following:
  • event {number}, indicates a numeric value that defines the index of the event to request
  • event {string}, specifies a string expression that defines the identifier/key of the event to request
  • event {Event}, specifies the object reference to the event to request for
Returns:
Returns null or an object of Event type
Type
Event
Event

GetEvents() → {Events}

The GetEvents() method returns the control's events.
Returns:
Returns an object of Events type.
Type
Events
Example
The following statements are equivalents:

 oSchedule.GetEvents(), returns the control's events
 oSchedule.Events, returns the control's events

where oSchedule is an object of Schedule type
GetEvents

GetGroups() → {Group}

The GetGroups() method returns the control's groups.
Returns:
Returns an object of Groups type.
Type
Group
Example
The following statements are equivalents:

 oSchedule.GetGroups(), returns the control's groups
 oSchedule.Groups, returns the control's groups

where oSchedule is an object of Schedule type
GetGroups

GetLayout(oOptsopt) → {string}

The GetLayout() method saves the UI layout of the object to an encoded string. The layout can be restored using the SetLayout() method. Currently, the control's Layout property serializes the following:
  • layout of windows (size, dock, parent)
  • calendar's selected date(s)
  • selected events
  • control's zoom
  • size of the day
  • UI layout of the groups (position, size)
Parameters:
Name Type Attributes Description
oOpts object <optional>
An object of {iMask,eMask,base64,equal,eol} type that defines options to serialize the properties of the container as explained bellow:
  • iMask {string}, specifies the mask (can include ? or * wild-characters) of properties to save
  • eMask {string}, specifies the mask (can include ? or * wild-characters) of properties to exclude from save
  • base64 {boolean}, Encodes the result to BASE 64
  • equal {string}, Indicates the separator between the name and the value. If missing, the = character is used
  • eol {string}, A character that separates the properties. By default it is "\n"
Returns:
Returns a string that encodes the current UI layout for the entire object
Type
string
Example
The following statements are equivalents:

 oSchedule.GetLayout(), gets the control's layout
 oSchedule.Layout, gets the control's layout

where oSchedule is an object of Schedule type
GetLayout

GetMarkZones() → {MarkZone}

The GetMarkZones() method returns the control's mark-zones.
Returns:
Returns an object of MarkZones type.
Type
MarkZone
Example
The following statements are equivalents:

 oSchedule.GetMarkZones(), returns the control's mark-zones
 oSchedule.MarkZones, returns the control's mark-zones

where oSchedule is an object of Schedule type
GetMarkZones

GetSelection() → {array}

The GetSelection() method gets the control's selection.
Returns:
The GetSelection can return one of the following:
  • null, indicates that the control has no selected-events
  • {Event}, indicates a single-selected event (while the control support single-selection only)
  • {Event[]}, defines a collection of selected-events within the control
Type
array
Example
The following statements are equivalents:

 oSchedule.GetSelection(), gets the control's selection
 oSchedule.Selection, gets the control's selection

where oSchedule is an object of Schedule type
GetSelection

GetSingleSel() → {Schedule.SingleSelEnum}

The GetSingleSel() method specifies whether the control supports single, multiple, toggle selection.
Returns:
Returns an OR combination of Schedule.SingleSelEnum flags that specifies how to select events
Type
Schedule.SingleSelEnum
GetSingleSel

GetStatistics() → {string}

The GetStatistics() method gives statistics data of objects being hold by the control
Returns:
Returns statistics data of objects being hold by the control such as:
Size: 1,536x754
Zoom: 100%
Event: 32/55
Sel: 1
Type
string
Example
The following statements are equivalents:

 oSchedule.GetStatistics(), gives statistics data of objects being hold by the control
 oSchedule.Statistics, gives statistics data of objects being hold by the control

where oSchedule is an object of Schedule type
GetStatistics

Group(id) → {Group}

The Group() method returns the group based on its index or identifier. The Group(id) method is equivalent with Group(id) method of the Groups object
Parameters:
Name Type Description
id any The group parameter could be any of the following:
  • group {number}, indicates a numeric value that defines the index of the group to request
  • group {string}, specifies a string expression that defines the identifier of the group to request
  • group {Group}, specifies the object reference to the group to request for
Returns:
Returns null or an object of Group type
Type
Group
Group

GroupUndoRedoActions(countopt)

The GroupUndoRedoActions() method groups the next to current Undo/Redo actions into a single block
Parameters:
Name Type Attributes Description
count number <optional>
Indicates the number of actions to group (if missing all actions are grouped)
Since:
  • 2.1
Example
GroupUndoRedoActions(), groups all Undo/Redo operations into a block
GroupUndoRedoActions

MarkZone(id) → {MarkZone}

The MarkZone() method returns the mark-zone based on its index or identifier. The MarkZone(id) method is equivalent with MarkZone(id) method of the MarkZones object
Parameters:
Name Type Description
id any The mark-zone parameter could be any of the following:
  • mark-zone {number}, indicates a numeric value that defines the index of the mark-zone to request
  • mark-zone {string}, specifies a string expression that defines the identifier of the mark-zone to request
  • mark-zone {MarkZone}, specifies the object reference to the mark-zone to request for
Returns:
Returns null or an object of MarkZone type
Type
MarkZone
MarkZone

RedoListAction(actionopt, countopt) → {string}

The RedoListAction() method gets the Redo actions that can be performed.
Parameters:
Name Type Attributes Description
action string <optional>
Specifies null(to list all Redo actions) or the mask-pattern to match the action to list. Space sparates multiple mask-pattern. The mask-pattern supports wild characters as explained:
  • * (Any), masks any combination of characters
  • ? (Alphabetic), masks a letter such as [a-z] or [A-Z]
  • # (Digit), masks a digit character, [0-9]
  • [...] (Alternative), masks any characters that are contained in the [] brackets. For instance, the [abcA-C] mask
count number <optional>
Indicates the number of Redo actions to list (if missing all Redo actions are listed)
Since:
  • 2.1
Returns:
Returns the list of Redo actions that can be performed
Type
string
Example
RedoListAction(), lists all Redo actions that can be executed
  RedoListAction("*Event"), lists all "*Event" Redo actions that can be executed, such as AddEvent, RemoveEvent, UpdateEvent or MoveEvent
  RedoListAction("AddEvent"), lists first "AddEvent" Redo actions that can be executed
RedoListAction

RedoRemoveAction(actionopt, countopt)

The RedoRemoveAction() method removes the first actions from the Redo queue
Parameters:
Name Type Attributes Description
action string <optional>
Specifies null(to remove all Redo actions) or the mask-pattern to match the action to remove. Space sparates multiple mask-pattern. The mask-pattern supports wild characters as explained:
  • * (Any), masks any combination of characters
  • ? (Alphabetic), masks a letter such as [a-z] or [A-Z]
  • # (Digit), masks a digit character, [0-9]
  • [...] (Alternative), masks any characters that are contained in the [] brackets. For instance, the [abcA-C] mask
count number <optional>
Indicates the number of actions to remove (if missing all actions are removed) from the Redo queue
Since:
  • 2.1
Example
RedoRemoveAction(), removes all actions from the Redo queue
  RedoRemoveAction("*Event"), removes all "*Event" actions, such as AddEvent, RemoveEvent, UpdateEvent or MoveEvent, from the Redo queue
  RedoRemoveAction("AddEvent"), removes the first "AddEvent" Redo action from the Redo queue
RedoRemoveAction

Refresh()

The Refresh() method refreshes the entire control
Refresh

RemoveScheduleView(name)

The RemoveScheduleView() method removes the view already created by the AddScheduleView() method
Parameters:
Name Type Description
name string defines the name of the schedule-view to be removed. The "schedule" defines the control's default-schedule view, and it can not be removed.
RemoveScheduleView

RemoveSelection() → {number}

The RemoveSelection() method deletes the selected-events.
Returns:
Returns the number of the events being deleted
Type
number
RemoveSelection

ScheduleView(name) → {SV}

The ScheduleView() method gets the schedule-view by name (which was previously created by the AddScheduleView() method)
Parameters:
Name Type Description
name string defines the name of the schedule-view to request ("schedule" defines the control's default-schedule view)
Returns:
Returns null or the an object of SV type associated with the name
Type
SV
ScheduleView

SelectAll(toSelect)

The SelectAll(toSelect) method selects all events within the control.
Parameters:
Name Type Description
toSelect any Specifies the events to select within the control as one of the following values:
  • null {null}, unselects any event within the control
  • undefined or "all" {string}, selects all events within the control
  • "vis" {string}, selects just the visible-events within the control (only the events that fit the current view)
Example
SelectAll("vis"), selects the visible events only
SelectAll

SetEvents(oEventsDef)

The SetEvents() method defines the events of the control
Parameters:
Name Type Description
oEventsDef object Defines the events to add. The oEventsDef field can be any of the following:
  • {array(any)}, defines multiple events, with specified options, as an array of [{EventOptions}] type
  • {object}, defines multiple events, where each property(key) of the object defines the event with its options, of EventOptions type
Example
Events = [{start: "#1/1/2001 10:00#", end: "#1/1/2001 12:00#"}], {array} defines a single event
 Events = 
 {
   "E1":
   {
     start: "#1/1/2001 10:00#",
     end: "#1/1/2001 12:00#"
   },
   "E2":
   {
     start: "#1/1/2001 12:00#",
     end: "#1/1/2001 14:00#",
     visible: false
   }
 }, {object} defines two events "E1" and "E2"
 
SetEvents

SetGroups(oGroupsDef)

The SetGroups() method defines the groups of the control
Parameters:
Name Type Description
oGroupsDef object Defines the groups to add. The oGroupsDef field can be any of the following:
  • {string}, defines a single group with specified caption/identifier
  • {array(any)}, defines multiple groups, with specified caption/identifier/options, as an array of [caption] or [{GroupOptions}] type
  • {object}, defines multiple groups, where each property of the object defines a group with its options, of GroupOptions type
Example
Groups = "G1", {string} defines a single group with the identifier/caption "G1"
 Groups = ["G1",{caption: "G2", visible: true}], {array} defines two groups "G1" and "G2"
 Groups = 
 {
   "G1":
   {
   },
   "G2":
   {
     visible: true
   },
   "G3":
   {
     eventShape: "red",
     visible: true
   }
 }, {object} defines three groups "G1", "G2" and "G3"
 
SetGroups

SetLayout(layout, oOptsopt)

The SetLayout() method restores the UI layout of the object from an encoded string, previously returned by the GetLayout() method. Currently, the control's Layout property serializes the following:
  • layout of windows (size, dock, parent)
  • calendar's selected date(s)
  • selected events
  • control's zoom
  • size of the day
  • UI layout of the groups (position, size)
Parameters:
Name Type Attributes Description
layout string A string expression that defines the UI layout to apply
oOpts object <optional>
An object of {iMask,eMask,base64,equal,eol} type that defines options to serialize the UI layout as explained bellow:
  • iMask {string}, specifies the mask (can include ? or * wild-characters) of properties to load
  • eMask {string}, specifies the mask (can include ? or * wild-characters) of properties to exclude from load
  • base64 {boolean}, Decodes the layout from BASE 64
  • equal {string}, Indicates the separator between the name and the value. If missing, the = character is used
  • eol {string}, A sequence of characters that can separate the properties. By default, any of \n, \r or ; separates the properties
SetLayout

SetMarkZones(oMarkZonesDef)

The SetMarkZones() method defines the mark-zones of the control
Parameters:
Name Type Description
oMarkZonesDef object Defines the mark-zones to add. The oMarkZonesDef field can be any of the following:
  • {array(any)}, defines multiple mark-zones, with specified caption/identifier/options, as an array of [caption] or [{MarkZoneOptions}] type
  • {object}, defines multiple mark-zones, where each property of the object defines a mark-zone (where the property name indicates the caption of the mark-zone) with its options, of MarkZoneOptions type
Example
MarkZones = ["Z1",{shape: "red"}], {array} defines two mark-zones "Z1" and "Z2"
 MarkZones = 
 {
   "Z1":
   {
   },
   "Z2":
   {
   },
   "Z3":
   {
     shape:
     {
       pattern: 6,
       patternColor: "lightgray"
     },
     visible: false
   }
 }, {object} defines three mark-zones "Z1", "Z2" and "Z3" (hidden)
 
SetMarkZones

SetSelection(value)

The SetSelection() method sets the control's selection.
Parameters:
Name Type Description
value any The value can be any of the following:
  • value {null}, clears the entire selection (unselect all)
  • value {number}, selects an event giving index within the events collection
  • value {string}, selects an event giving its identifier/key
  • value {Event}, selects an event giving its reference
  • value {Event}, selects all events within the control
  • value {array}, specifies an array of [type] type, where type could be any number, string or Event type.
Example
null {null}, clears the entire selection (unselect all)
 [0,"A"] {array}, selects the events with the index 0 and key 'A'
SetSelection

SetSingleSel(value)

The SetSingleSel() method changes the control's selection to single, multiple or toggle
Parameters:
Name Type Description
value Schedule.SingleSelEnum An OR combination of Schedule.SingleSelEnum flags to specify how user can select events
Example
0 or exontrol.Schedule.SingleSelEnum.exDisableSel {number}, disables selecting any event
 3 or exontrol.Schedule.SingleSelEnum.exSingleSel | exontrol.Schedule.SingleSelEnum.exEnableSel {number}, enables control's single selection, so only a single event can be selected
 6 or exontrol.Schedule.SingleSelEnum.exToggleSel | exontrol.Schedule.SingleSelEnum.exSingleSel {number}, enables control's single and toggle selection, which means that once a event is selected it gets unselected once it is clicked, or reverse, and only a single-event can be selected at once. 
SetSingleSel

UndoListAction(actionopt, countopt) → {string}

The UndoListAction() method gets the Undo actions that can be performed.
Parameters:
Name Type Attributes Description
action string <optional>
Specifies null(to list all Undo actions) or the mask-pattern to match the action to list. Space sparates multiple mask-pattern. The mask-pattern supports wild characters as explained:
  • * (Any), masks any combination of characters
  • ? (Alphabetic), masks a letter such as [a-z] or [A-Z]
  • # (Digit), masks a digit character, [0-9]
  • [...] (Alternative), masks any characters that are contained in the [] brackets. For instance, the [abcA-C] mask
count number <optional>
Indicates the number of Undo actions to list (if missing all Undo actions are listed)
Since:
  • 2.1
Returns:
Returns the list of Undo actions that can be performed
Type
string
Example
UndoListAction(), lists all Undo actions that can be executed
  UndoListAction("*Event"), lists all "*Event" Undo actions that can be executed, such as AddEvent, RemoveEvent, UpdateEvent or MoveEvent.
  UndoListAction("AddEvent",1), lists first "AddEvent" Undo actions that can be executed
UndoListAction

UndoRemoveAction(actionopt, countopt)

The UndoRemoveAction() method removes the last actions from the Undo queue
Parameters:
Name Type Attributes Description
action string <optional>
Specifies null(to remove all Undo actions) or the mask-pattern to match the action to remove. Space sparates multiple mask-pattern. The mask-pattern supports wild characters as explained:
  • * (Any), masks any combination of characters
  • ? (Alphabetic), masks a letter such as [a-z] or [A-Z]
  • # (Digit), masks a digit character, [0-9]
  • [...] (Alternative), masks any characters that are contained in the [] brackets. For instance, the [abcA-C] mask
count number <optional>
Indicates the number of actions to remove (if missing all actions are removed) from the Undo queue
Since:
  • 2.1
Example
UndoRemoveAction(), removes all actions from the Undo queue
  UndoRemoveAction("*Event"), removes all "*Event" actions, such as AddEvent, RemoveEvent, UpdateEvent or MoveEvent, from the Undo queue
  UndoRemoveAction("AddEvent"), removes the first "AddEvent" Undo action from the Undo queue
UndoRemoveAction

UnselectAll()

The UnselectAll() method clears the control's selection.
UnselectAll

Update(callback, thisArgopt)

The Update() method locks the control's paint during the callback, and invalidates the control once the method ends.
Parameters:
Name Type Attributes Description
callback callback Indicates a callback to perform changes within the control
thisArg any <optional>
Specifies the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Schedule type
Update

feE(callback, thisArgopt)

The feE/forEachEvent() method invokes the callback for each event of the control (unscrolled(top,bottom events) and scrolled events as well)
Parameters:
Name Type Attributes Description
callback callback A function of callback(oEvent) type that's called for every event, where oEvent is:
  • oEvent {Event}, specifies an event of Event type
thisArg any <optional>
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Schedule type.
feE

feEU(callback, thisArgopt) → {any}

The feEU/forEachEventUnit() method invokes the callback for each event of the control (unscrolled(top,bottom events) and scrolled events as well), until the callback returns a not-empty value
Parameters:
Name Type Attributes Description
callback callback A function of callback(oEvent) {any} type that's called for every event, where oEvent is
  • oEvent {Event}, specifies an event of Event type
thisArg any <optional>
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Schedule type.
Returns:
Returns the last-value of the callback
Type
any
feEU

onUI()

The onUI() method requests to update the windows UI layout
onUI

Events

onaddevent

The onaddevent() method notifies your application that a new event has been added to the control
Parameters:
Name Type Description
oEvent Event Indicates an object of Event type being added
Example
The following samples display the event being added:

oSchedule.onaddevent = function (oEvent)
{
 console.log(oEvent);
}

or

oSchedule.Listeners.Add("onaddevent", function (oEvent)
{
 console.log(oEvent);
})

where oSchedule is an object of Schedule type
onaddevent

oncalselchange

The oncalselchange() method notifies that the control's selection has been changed (events).
Parameters:
Name Type Description
oEvent object holds the control's selection, as explained:
  • oEvent {null}, indicates that the control has no selected events
  • oEvent {Event}, indicates an object of Event type that defines the control's single-event selected
  • oEvent {array}, specifies an array of [Event] type that holds all selected events within the control
Example
The following samples display the control's selection once it changes:

oSchedule.oncalselchange = function (oEvent)
{
 console.log(oEvent);
}

or

oSchedule.Listeners.Add("oncalselchange", function (oEvent)
{
 console.log(oEvent);
})

where oSchedule is an object of Schedule type
oncalselchange

onremoveevent

The onremoveevent() method occurs once an event has been removed from the Events collection
Parameters:
Name Type Description
oEvent Event Indicates an object of Event type being removed
Example
The following samples display the event being removed:

oSchedule.onremoveevent = function (oEvent)
{
 console.log(oEvent);
}

or

oSchedule.Listeners.Add("onremoveevent", function (oEvent)
{
 console.log(oEvent);
})

where oSchedule is an object of Schedule type
onremoveevent

onselchange

The onselchange() method notifies that the control's selection has been changed (events).
Parameters:
Name Type Description
oEvent object holds the control's selection, as explained:
  • oEvent {null}, indicates that the control has no selected events
  • oEvent {Event}, indicates an object of Event type that defines the control's single-event selected
  • oEvent {array}, specifies an array of [Event] type that holds all selected events within the control
Example
The following samples display the control's selection once it changes:

oSchedule.onselchange = function (oEvent)
{
 console.log(oEvent);
}

or

oSchedule.Listeners.Add("onselchange", function (oEvent)
{
 console.log(oEvent);
})

where oSchedule is an object of Schedule type
onselchange