The Scheduler widget shows a schedule view of a user.


  • UI Type:

Extends: BaseWidget

Properties

Name Desciption
Add DialogDialog that should be used when adding items.
Auto-adjust HeightAdjusts the height according to the window height.
Auto-adjust WidthAdjusts the width according to the window width.
DisabledThe widget cannot be used.
Edit DialogDialog that should be used when editing items.
End TimeAttribute for an event's end time.
Group ByTODO.
HiddenHides the widget from the user.
Hide ControlsHide buttons for controlling which dates are shown in the scheduler.
Interval (days)Attribute for an event's daily interval.
Interval (months)Attribute for an event's monthly interval.
Interval (weeks)Attribute for an event's weekly interval.
Interval (years)Attribute for an event's yearly interval.
Interval ExceptionsRelation to use for exceptions in an event's recurring interval.
Label FunctionFunction for generating the events' labels.
Length (repeating events)The length (in hours) of repeating events.
MaximizeSet this widget to be maximized (take up all available space).
Minimum Row HeightThe minimum height rows will be rendered.
Model NameModel for the scheduler's data.
Multiple RowsShould the scheduler have multiple rows?
Optimize ForOptimize the layout for the specified type.
Replace TimeThe start time of the event to replace with the exception.
Section FunctionFunction for generating the resources' labels.
Start TimeAttribute for an event's start time.
Tab IndexThe Tab Index is an integer that tells the order of the widget when using the tab-key to move from one widget to another.
Title AttributeAttribute for an event's title.

Style

Name Desciption
Background-colorChange background color of the widget.
ColorColor of the text inside the widgets. May not apply to all text inside all widgets.
Font SizeSet the font size in pixels for text.
Text-alignmentSet left, centered or right. Applies both to icon and text.

Events

Name Description Event Attribute
Blur Event when a widget goes out of focus.
event The event that gets triggered when the user "leaves" an element.
CellClick Triggered when a cell is clicked on the data table
event Object containing the item (event.item) that was clicked
Click Event that triggers based on touch or click
event The event that triggered the handler
DblClick Event that triggers based on double click
event The event that triggered the handler
Focus Event when indicating/ highlighting widget using the cursor
event Focus is the event that gets triggered when a user makes an element come into focus, by clicking on it.
ItemClick Triggered when an item in a list, table or a calendar is clicked
event Object containing the item (event.item) that was clicked
Update Triggered when the element has been updated
event Object containing the record (event.record) that was updated
Zoom Triggered when a zoom event is initialised
event Object containing the current zoom (event.zoom)

Function

getSelectedPeriod ( )

addItem ( name: String , start: Object , end: Object , section: Object )

Adds an item to the scheduler.

Parameters
Name Type Description
name String The name of the item.
start Object Start time of the item.
end Object End time of the item.
section Object The section that the item should belong to.

addSection ( name: String )

Adds a section to the scheduler

Parameters
Name Type Description
name String The name of the new section.

clearTimeouts ( )

Clears all timeouts

daysInMonth ( ) →{ Array }

Returns an array of month days.

Returns

An array of {val, label} hashes representing the month days.

daysInWeek ( ) →{ Array }

Returns an array of weekdays.

Returns

An array of {val, label} hashes representing the weekdays.

getCurrentPeriod ( ) →{ Object }

Returns the scheduler's currently selected period.

Returns

The current period

getItem ( id: String ) →{ Object }

Returns the item with the specified ID.

Parameters
Name Type Description
id String The id of the item.
Returns

The item with the specified ID.

getItems ( ) →{ Array }

Returns an array of all items.

Returns

An array of all items.

getPeriods ( ) →{ Array }

Returns an array of all of the scheduler's periods.

Returns

An array containing all of the scheduler's periods.

getSections ( ) →{ Array }

Returns an array of all of the scheduler's sections.

Returns

An array holding all of the scheduler's sections.

getStart ( ) →{ Date }

Returns the start date of the scheduler

Returns

The start date

refresh ( )

Refreshes the widget.

setAllocationLabelType ( type: String , preventUpdate: Boolean )

Sets the type of the allocation label.

Parameters
Name Type Description
type String
preventUpdate Boolean

setCellException ( start: Object , end: Object , preventUpdate: Boolean )

Sets the cell exception.

Parameters
Name Type Description
start Object Start time
end Object End time
preventUpdate Boolean

setCustomPeriod ( period: Object , skipEvent: Boolean , keepStart: Boolean )

Creates and sets a custom period.

Parameters
Name Type Description
period Object The period to create.
skipEvent Boolean
keepStart Boolean

setFilter ( filter: Object )

Sets a filter. The filter is used to filter displayed sections.

Parameters
Name Type Description
filter Object An object containing the fields to use for the filter.
Properties
NameTypeDescription
filterStringAn section attribute to filter on.
valueObjectThe desired value of the section attribute.

setPeriod ( period: Object , skipEvent: Boolean , keepStart: Boolean )

Sets the scheduler's selected period

Parameters
Name Type Description
period Object The new period.
skipEvent Boolean
keepStart Boolean

setStartAndEnd ( start: Date, end: Date )

Sets the displayed start and end dates.

Parameters
Name Type Description
start Date The start date.
end Date The end date.

setStartDate ( start: Date )

Sets the start date of the scheduler

Parameters
Name Type Description
start Date The new start date.

blur ( )

Triggers the blur event.

focus ( )

Triggers the focus event.

get ( name: String ) →{ Object }

Gets the value of the specified property.

Parameters
Name Type Description
name String The name of the property.
Returns

The property's value.

getId ( ) →{ ID }

Returns the ID of the widget.

Returns

The ID of the widget

getValue ( ) →{ Object }

Returns the widget's value.

Returns

The widget's value.

hide ( )

Hides the widget.

isEnabled ( ) →{ Boolean }

Returns true if the widget is enabled.

Returns

True if enabled, otherwise false.

isHidden ( ) →{ Boolean }

Returns true if the widget is hidden.

Returns

True if hidden, otherwise false.

set ( name: String , value: Object )

Sets the value of the specified property.

Parameters
Name Type Description
name String The name of the property.
value Object The new value.

setEnabled ( Enabled: Boolean )

Enables/disables the widget.

Parameters
Name Type Description
Enabled Boolean True to enable the widget, false to disable.

setStyle ( Object: Object )

Set the widget-style

Parameters
Name Type Description
Object Object properties

setValue ( value: Object )

Sets the widget's value.

Parameters
Name Type Description
value Object The new value.

show ( )

Shows the widget.