AbstractTimeRanges

Abstract base class, you should not use this class directly.

Configs

16

Common

bodyRenderer: function

Function used to generate the HTML content for a time range body element.

const scheduler = new Scheduler({
  features : {
    timeRanges : {
      bodyRenderer({ timeRange }) {
        return `${timeRange.name}`
      }
    }
  }
});
ParameterTypeDescription
dataObject

Render data

data.timeRangeTimeSpan
Returns: String -

String representing the HTML markup

enableResizing: Boolean= false

Set to true to enable dragging and resizing of range elements in the header. Note that enabling dragging/resizing also enables showHeaderElements automatically.

headerRenderer: function

Function used to generate the HTML content for a time range header element.

const scheduler = new Scheduler({
  features : {
    timeRanges : {
      headerRenderer({ timeRange }) {
        return `${timeRange.name}`
      }
    }
  }
});
ParameterTypeDescription
dataObject

Render data

data.timeRangeTimeSpan
Returns: String -

String representing the HTML markup

A Tooltip config object which is applied to the tooltip shown when hovering a TimeRange header element

Set to false to not render range elements into the time axis header. Note that header elements are required for interaction such as dragging/resizing, so enabling enableResizing will automatically enable this setting.

showTooltip: Boolean | TooltipConfig= true

A Boolean specifying whether to show tooltip while resizing range elements, or a Tooltip config object which is applied to the tooltip

tooltipTemplate: function

Template used to generate the tooltip contents when hovering a time range header element.

const scheduler = new Scheduler({
  features : {
    timeRanges : {
      tooltipTemplate({ timeRange }) {
        return `${timeRange.name}`
      }
    }
  }
});
ParameterTypeDescription
dataObject

Tooltip data

data.timeRangeTimeSpan
data.startClockHtmlString

Predefined HTML to show the start time

data.endClockHtmlString

Predefined HTML to show the end time

Returns: String -

String representing the HTML markup

disabledInstancePlugin
listenersEvents

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Other

Properties

18

Common

Set to false to not render range elements into the time axis header. Note that header elements are required for interaction such as dragging/resizing, so enabling enableResizing will automatically enable this setting.

disabledInstancePlugin

Class hierarchy

isAbstractTimeRanges: Boolean= truereadonly
Identifies an object as an instance of AbstractTimeRanges class, or subclass thereof.
isAbstractTimeRanges: Boolean= truereadonlystatic
Identifies an object as an instance of AbstractTimeRanges class, or subclass thereof.
isDelayableDelayable
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Other

The Tooltip instance shown when hovering a TimeRange header element

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Functions

31

Other

Generates the html to display in the tooltip during drag drop. If you want to customize the contents of the tooltip, supply a dragTipTemplate instead of overriding this function.

Based on this method result the feature decides whether the provided range should be rendered or not. The method checks that the range intersects the current viewport.

Override the method to implement your custom range rendering vetoing logic.

ParameterTypeDescription
rangeTimeSpan

Range to render.

viewStartDateDate

Specifies view start date. Defaults to view visible range start

viewEndDateDate

Specifies view end date. Defaults to view visible range end

Returns: Boolean -

true if the range should be rendered and false otherwise.

createOnFrameDelayable
LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Events

8

Fired on the owning Scheduler or Gantt widget when a click happens on a time range header element

// Adding a listener using the "on" method
abstractTimeRanges.on('timeRangeHeaderClick', ({ source, timeRangeRecord, domEvent }) => {

});
ParameterTypeDescription
sourceScheduler

Scheduler instance

timeRangeRecordTimeSpan

The record

domEventMouseEvent

Browser event

Fired on the owning Scheduler or Gantt widget when a right click happens on a time range header element

// Adding a listener using the "on" method
abstractTimeRanges.on('timeRangeHeaderContextMenu', ({ source, timeRangeRecord, domEvent }) => {

});
ParameterTypeDescription
sourceScheduler

Scheduler instance

timeRangeRecordTimeSpan

The record

domEventMouseEvent

Browser event

Fired on the owning Scheduler or Gantt widget when a double click happens on a time range header element

// Adding a listener using the "on" method
abstractTimeRanges.on('timeRangeHeaderDblClick', ({ source, timeRangeRecord, domEvent }) => {

});
ParameterTypeDescription
sourceScheduler

Scheduler instance

timeRangeRecordTimeSpan

The record

domEventMouseEvent

Browser event

catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

8

Called on the owning Scheduler or Gantt widget when a click happens on a time range header element

new AbstractTimeRanges({
    onTimeRangeHeaderClick({ source, timeRangeRecord, domEvent }) {

    }
});
ParameterTypeDescription
sourceScheduler

Scheduler instance

timeRangeRecordTimeSpan

The record

domEventMouseEvent

Browser event

Called on the owning Scheduler or Gantt widget when a right click happens on a time range header element

new AbstractTimeRanges({
    onTimeRangeHeaderContextMenu({ source, timeRangeRecord, domEvent }) {

    }
});
ParameterTypeDescription
sourceScheduler

Scheduler instance

timeRangeRecordTimeSpan

The record

domEventMouseEvent

Browser event

Called on the owning Scheduler or Gantt widget when a double click happens on a time range header element

new AbstractTimeRanges({
    onTimeRangeHeaderDblClick({ source, timeRangeRecord, domEvent }) {

    }
});
ParameterTypeDescription
sourceScheduler

Scheduler instance

timeRangeRecordTimeSpan

The record

domEventMouseEvent

Browser event

onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

2