CalendarModel
This class represents a calendar in the Scheduler Pro project. It contains a collection of the CalendarIntervalModel. Every interval can be either recurrent (regularly repeating in time) or static. These intervals can be visualized by the ResourceNonWorkingTime or NonWorkingTime features.
Please refer to the calendars guide for details
Configs
2
Configs
2Other
A flag, indicating whether the duration calculation should adjust the result to DST time shift. By default, this flag is ignored and the corresponding flag from the ProjectModel is used.
However, if you are using the calendar instance independently of the project, this flag might come in handy.
Models & Stores
Properties
71
Properties
71Class hierarchy
Other
Intervals store of the calendar created from the intervals field.
Editing
JSON
Models & Stores
Parent & children
Functions
64
Functions
64Other
This method adds a single CalendarIntervalModel to the internal collection of the calendar
| Parameter | Type | Description |
|---|---|---|
interval | CalendarIntervalModel | CalendarIntervalModelConfig | record or an object with data used to create a new record |
Added intervals
This method adds an array of CalendarIntervalModel to the internal collection of the calendar
| Parameter | Type | Description |
|---|---|---|
intervals | CalendarIntervalModel[] | CalendarIntervalModelConfig[] | An array of records or an array of objects with data used to create new records |
Added intervals
Calculate the working time duration for specific interval, in milliseconds.
| Parameter | Type | Description |
|---|---|---|
startDate | Date | Start of the interval |
endDate | Date | End of the interval |
Returns working time in milliseconds
Calculates the end date of the time interval which starts at startDate and has durationMs working time
duration (in milliseconds).
| Parameter | Type | Description |
|---|---|---|
startDate | Date | Start date |
durationMs | Number | Duration in milliseconds |
The end date
Calculates the start date of the time interval which ends at endDate and has durationMs working time
duration (in milliseconds).
| Parameter | Type | Description |
|---|---|---|
endDate | Date | End date |
durationMs | Number | Duration in milliseconds |
The start date
This method removes all intervals from the internal collection of the calendar
| Parameter | Type | Description |
|---|---|---|
silent | Boolean | Do not trigger events |
Returns non-working time ranges between the provided dates.
| Parameter | Type | Description |
|---|---|---|
startDate | Date | Start of the period to get ranges from |
endDate | Date | End of the period to get ranges from |
An array of objects representing non-working time ranges
Returns working time ranges between the provided dates.
| Parameter | Type | Description |
|---|---|---|
startDate | Date | Start of the period to get ranges from |
endDate | Date | End of the period to get ranges from |
An array of objects representing working time ranges
Checks if there is a working time interval in the provided time range
| Parameter | Type | Description |
|---|---|---|
startDate | Date | Start of the interval |
endDate | Date | End of the interval |
Returns true if the interval contains working time
Returns the earliest point at which a working period of time starts, following the given date. Can be the date itself, if it occurs during working time.
| Parameter | Type | Description |
|---|---|---|
date | Date | The date after which to skip the non-working time |
isForward | Boolean | Whether the "following" means forward in time or backward |
The earliest available date
Configuration
Editing
Events
Parent & children
Typedefs
1
Typedefs
1Fields
8
Fields
8Other
A CSS class to add to calendar interval elements rendered in the UI.
A CSS class defining an icon to show in non-working time elements rendered in the UI.
If using the timeZone config, you can set this to true to
not convert this calendar to the specified time zone.
Intervals collection of the calendar. Accepts an array as its input, which behind the scenes will be converted to an intervalStore containing the intervals. When serializing it will be converted back to an array.
The calendar name.
A flag indicating how to treat invalid intervals produced by recurrence start/end rules. The recurrences could be misconfigured, producing unmatched start and end date instances.
The field supports the following set of values:
Skip- skip such intervals silently (default)Throw- throw an exception when facing such invalid interval
The flag, indicating, whether the "unspecified" time (time that does not belong to any interval
is working (true) or not (false).
Tree
Start expanded or not