CalendarMode#
Selects which calendars place a task's work: the calendars of the assigned resources, or task calendars only. It's the type of SchedulingConfig::calendar_mode. The default is CalendarMode::Resource.
With the serde feature, CalendarMode implements Serialize and Deserialize. Variants serialize in kebab-case: "resource", "task", "task-inherited".
Declaration#
Variants#
| Variant | Description |
|---|---|
Resource |
Default. Each assignment works on its resource's calendar intersected with the task's calendar. A task with several assignment calendars spans all of its assignments. |
Task |
Task calendars only. Resource calendars are ignored. This is the dhtmlxGantt model. |
TaskInherited |
Task calendars only, as in Task. A task without its own calendar uses the calendar of the nearest ancestor that has one. |
Only TaskInherited inherits calendars from parent tasks. For how the calendars combine, see Working-time calendars.
Methods#
task_only#
Returns true when resource calendars aren't used: Task and TaskInherited.
inherits#
Returns true when tasks inherit their parent's calendar: TaskInherited only.
Example#
use ;
Related#
CalendarData- the calendars this mode chooses betweenResourceData- itscalendar_idis read only inResourcemodeTaskData- itscalendar_idis the task calendar in every mode- Working time and calendars - how task and resource calendars combine in each mode
- Import from dhtmlxGantt - picks the mode that matches gantt's calendar model