ResourceTimeRangeModel

This class represent a single resource time range in your schedule. To style the rendered elements, use cls or timeRangeColor field. The class is used by the ResourceTimeRanges feature.

Recurring ranges support

You can also make ranges recurring by adding a recurrenceRule to the range data.


// Make new store that supports time ranges recurrence
const store = new ResourceTimeRangeStore({
    data : [{        {
        id             : 1,
        resourceId     : 'r1',
        startDate      : '2019-01-01T11:00',
        endDate        : '2019-01-01T13:00',
        name           : 'Coffee break',
        // this time range should repeat every day
        recurrenceRule : 'FREQ=DAILY'
    }]
});

Properties

79

Class hierarchy

isResourceTimeRangeModel: Boolean= truereadonly
Identifies an object as an instance of ResourceTimeRangeModel class, or subclass thereof.
isResourceTimeRangeModel: Boolean= truereadonlystatic
Identifies an object as an instance of ResourceTimeRangeModel class, or subclass thereof.
isModelModel
isModelLinkModelLink
isModelStmModelStm
isRecurringTimeSpanRecurringTimeSpan
isTimeSpanTimeSpan
isTimeZonedDatesMixinTimeZonedDatesMixin
isTreeNodeTreeNode

Other

The associated resource, retrieved using a relation to a ResourceStore determined by the value assigned to resourceId. The relation also lets you access all time ranges on a resource through timeRanges`.

$namestaticModel
relationsstaticModel

Editing

copyOfModel
isValidModel

Fields

allFieldsstaticModel
autoExposeFieldsstaticModel
childrenFieldstaticModel
defaultsstaticModel
fieldMapstaticModel
fieldsstaticModel
idFieldstaticModel

Grouping

Identification

keyModel

JSON

jsonModel

Lifecycle

configBase

Linked records

hasLinksModelLink
isLinkedModelLink
recordLinksModelLink

Misc

eventStoreTimeSpan
stmModelStm

Parent & children

allChildrenTreeNode
childLevelTreeNode
firstChildTreeNode
isLeafTreeNode
isLoadedTreeNode
isParentTreeNode
isRootTreeNode
lastChildTreeNode
nextSiblingTreeNode
parentTreeNode
parentIdTreeNode
wbsCodeTimeSpan

Recurrence

isOccurrenceRecurringTimeSpan
isRecurringRecurringTimeSpan
occurrenceIndexRecurringTimeSpan
recurrenceRecurringTimeSpan
recurrenceModelRecurringTimeSpan
supportsRecurringRecurringTimeSpan

Scheduling

datesTimeSpan
durationMSTimeSpan
isMilestoneTimeSpan
isScheduledTimeSpan

Functions

67

Configuration

applyDefaultsstaticBase

Editing

copyModel
getDataModel
removeModel
setModel

Events

Fields

addFieldstaticModel
getModel
isTimeZoneDateFieldstaticTimeZonedDatesMixin
processFieldstaticModel
removeFieldstaticModel

Identification

asIdstaticModel
generateIdstaticModel

JSON

toJSONModel

Lifecycle

destroystaticBase

Misc

equalsModel
exportToICSTimeSpan
initClassstaticBase
isOfTypeNamestaticBase
linkModelLink
mixinstaticBase

Other

shiftTimeSpan

Parent & children

appendChildTreeNode
bubbleTreeNode
bubbleWhileTreeNode
containsTreeNode
insertChildTreeNode
isExpandedTreeNode
removeChildTreeNode
traverseTreeNode

Recurrence

addExceptionDateRecurringTimeSpan
hasExceptionRecurringTimeSpan
setRecurrenceRecurringTimeSpan

Scheduling

forEachDateTimeSpan
setDurationTimeSpan
setEndDateTimeSpan
setStartDateTimeSpan
splitTimeSpan

Typedefs

1

Fields

2
resourceId: String | Number

Id of the resource this time range is associated with

Controls this time range's primary color, defaults to using current themes default time range color.