HolidayDirective

16 Dec 20251 minute to read

e-holidays directive represent a holidays collection in Gantt.
It must be contained in a Gantt component(ejs-gantt).

<ejs-gantt [dataSource]='data' allowSelection='true' allowSorting='true'>
  <e-holidays>
    <e-holiday from='02/20/2018' label='Holiday 1'></e-holiday>
    <e-holiday from='05/15/2018' label='Holiday 2'></e-holiday>
  </e-holidays>
</ejs-gantt>

Properties

cssClass any

Defines a custom CSS class for styling the holiday marker and label.
Use this to apply custom background, borders, or font styles.

Defaults to null

from any

Specifies the start date of the holiday.
Accepts a Date object or ISO-formatted string.

Defaults to null

label any

Defines a label or description for the holiday.
Useful for tooltips, annotations, and export metadata.

Defaults to null

to any

Specifies the end date of the holiday.
Accepts a Date object or ISO-formatted string.
If omitted, the holiday is treated as a single-day event.

Defaults to null