Category / Section
How to scroll to particular date in Gantt
1 min read
In Gantt, It is possible to scroll to the particular date in chart side by using create event. The create event will be triggered when Gantt is rendered completely.
$(function () { $("#GanttContainer").ejGantt({ //.. create: function(args) { var ganttObj = $("#GanttContainer ").ejGantt("instance"), date = new Date('01/10/2013'), // Set date as per your requirement scrollObj = $("#GanttContainer ").find(".e-ganttviewerbodyContianer").ejScroller("instance"), updatedLeft = ganttObj._getTaskLeft(date); scrollObj.scrollX(updatedLeft) } });
A simple sample to scroll to the particular date in chart side is available here