Articles in this section
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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied