How to include holidays in Gantt Chart?

1 Answer 152 Views
Gantt
Syamimi
Top achievements
Rank 1
Syamimi asked on 20 Feb 2023, 03:30 AM

Hi, I'm trying to include holidays in my Gantt chart so the project timeline would reflects the impact of holidays on project schedule. 

Below is how I've done so far. However, the timeline is still running on holidays. Please help me.

 let holidays = [
                    new Date (2023, 4, 1),
                    new Date (2023, 4, 4),

                ];

let taskData = [
                    {
                        id: 1,
                        title: "Task 1",
                        orderId: 0,
                        start: new Date("2023-04-30 08:00:00"),
                        duration: 24,
                        percentComplete: 0.45,
                        isExpanded: true,                   
},
                    {
                        id: 2,
                        title: "Task 2",
                        orderId: 2,
                        start: new Date("2023-05-02 08:00:00"),                        duration: 10,
                        percentComplete: 1,
                        isExpanded: true,
                    },
                    {
                        id: 3,
                        title: "Task 3",
                        orderId: 3,
                        start: new Date("2023-05-02 17:30:00 "),                        duration: 10,
                        percentComplete: 0.77,
                        isExpanded: true,
                    },
                ];
                let dataWithEndDate = taskData.map((task) => ({
                    ...task,
                    end: new Date (task.start.getTime() + task.duration * 60 * 60 * 1000),
                }));

render() {
       
        return (
           <div>
               <Gantt
taskData={dataWithEndDate}
                     columns={columns}
                     holidays={holidays}
                >
                </Gantt>
            </div>
       
        );
    }

 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 21 Feb 2023, 04:41 PM

Hello, Syamimi,

Defining holidays and/or non working days in the Gantt component is currently not supported and the only recommendation I can give is to submit a feature request in our feedback portal where new ideas are constantly being evaluated:

Once a request has gathered a sufficient amount of votes we can proceed to plan it based on our internal planning.

Regards,
Vessy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Gantt
Asked by
Syamimi
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or