aspnet-400935-components-gantt-work-time-rules.md
The Gantt control allows you to specify work days, work hours, and holidays.
Online Demo: ASPxGantt - Work Time Schedule
The Gantt stores its work time rules in the control’s WorkTimeRules collection. The following work time rules are available:
The following table lists common rule settings:
|
Property
|
Description
| | --- | --- | |
|
Specifies whether a day is a work day.
| |
Recurrence
|
Contains a rule’s recurrence settings. Each rule type contains an individual set of recurrence settings.
| |
|
Contains settings for work time ranges.
|
The Daily class contains settings for a daily recurrence pattern.
|
Property
|
Description
| | --- | --- | |
|
Specifies the daily recurrence’s start date.
| |
|
Specifies the daily recurrence’s end date.
| |
|
Specifies how many times a daily rule occurs.
| |
|
Specifies the daily recurrence’s interval.
|
Work time patterns:
A work day is from 8 AM to 5 PM with an hour break (for a specified month).
Each third day is a work day with a work shift from 10 AM to 10 PM.
The Weekly class contains settings for a weekly recurrence pattern.
|
Property
|
Description
| | --- | --- | |
|
Specifies a day of the week to which the rule is applied.
| |
|
Specifies the weekly recurrence’s start date.
| |
|
Specifies the weekly recurrence’s end date.
| |
|
Specifies how many times a weekly rule occurs.
| |
|
Specifies the weekly recurrence’s interval.
|
Work time patterns:
Fridays, Saturdays, and Sundays are weekend days.
Monday to Wednesday – work days from 8 AM to 2 PM, Thursday to Friday – work days from 2 PM to 8 PM, Saturday and Sunday – weekend days.
The Monthly class contains settings for a monthly recurrence pattern.
|
Property
|
Description
| | --- | --- | |
|
Specifies whether the Gantt control calculates the rule by the day of the week.
| |
|
Specifies a day.
| |
|
Specifies a day of the week’s occurrence.
| |
|
Specifies a day of the week to which the rule is applied.
| |
|
Specifies the monthly recurrence’s start date.
| |
|
Specifies the monthly recurrence’s end date.
| |
|
Specifies how many times a monthly rule occurs.
| |
|
Specifies the monthly recurrence’s interval.
|
Work time patterns:
Every second Friday in a month has a different work time.
Every 10th of the month is a day off (for three months).
The Yearly class contains settings for a yearly recurrence pattern.
|
Property
|
Description
| | --- | --- | |
|
Specifies whether the Gantt control applies the rule according to the day of the week.
| |
|
Specifies a day.
| |
|
Specifies a month.
| |
|
Specifies a day of the week’s occurrence.
| |
|
Specifies the day of the week to which the rule is applied.
| |
|
Specifies the yearly recurrence’s start date.
| |
|
Specifies the yearly recurrence’s end date.
| |
|
Specifies how many times a yearly rule occurs.
| |
|
Specifies the yearly recurrence’s interval.
|
Work time patterns:
Every year a day off is May 27.
The work day before a holiday is shortened by one hour.
See Also