# gantt-holidays

> Gantt timeline marks holidays and excludes them from working-day task calculations.

**Framework:** vue  **Component:** Gantt  **Variant:** holidays

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/vue/gantt-holidays.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-vue-gantt
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/gantt-holidays/Gantt.vue

```vue
<template>
  <div class="control-section">
    <div class="content-wrapper">
      <ejs-gantt
        ref="ganttChart"
        id="Holidays"
        :dataSource="data"
        :height="height"
        :rowHeight="46"
        :taskbarHeight="25"
        :highlightWeekends="true"
        :taskFields="taskFields"
        :labelSettings="labelSettings"
        :columns="columns"
        :treeColumnIndex="1"
        :holidays="holidays"
        :splitterSettings="splitterSettings"
        :projectStartDate="projectStartDate"
        :projectEndDate="projectEndDate"
      >
      </ejs-gantt>
    </div>
  </div>
</template>

<script lang="ts">
import { GanttComponent, Selection, DayMarkers } from "@syncfusion/ej2-vue-gantt";
import { getProjectNewData } from "../datasource/gantt-data";

export default {
  components: {
    'ejs-gantt': GanttComponent
  },
  data() {
    return {
      data: getProjectNewData(),
      height: '650px',
      taskFields: {
        id: 'TaskID',
        name: 'TaskName',
        startDate: 'StartDate',
        endDate: 'EndDate',
        duration: 'Duration',
        progress: 'Progress',
        dependency: 'Predecessor',
        parentID: 'ParentId'
      },
      columns: [
        { field: 'TaskID', visible: false, width: 80 },
        { field: 'TaskName', width: 280 },
        { field: 'StartDate' },
        { field: 'Duration' },
        { field: 'Progress' },
        { field: 'Predecessor' }
      ],
      labelSettings: {
        rightLabel: 'TaskName'
      },
      splitterSettings: {
        columnIndex: 1
      },
      holidays: [
        {
          from: new Date('03/28/2025'),
          to: new Date('03/28/2025'),
          label: 'Good Friday'
        },
        {
          from: new Date('03/30/2025'),
          to: new Date('03/30/2025'),
          label: 'Easter Sunday'
        },
        {
          from: new Date('05/26/2025'),
          to: new Date('05/26/2025'),
          label: 'Memorial Day'
        },
        {
          from: new Date('07/04/2025'),
          to: new Date('07/04/2025'),
          label: 'Independence Day'
        }
      ],
      projectStartDate: new Date('03/25/2025'),
      projectEndDate: new Date('07/20/2025')
    };
  },
  provide: {
    gantt: [DayMarkers, Selection]
  }
};
</script>

```
