Skip to main content
All docs
V24.1

ASPxClientGantt.ScrollToDate(date) Method

Scrolls the Gantt chart to the specified date.

Declaration

ScrollToDate(
    date: Date | string | number
): void

Parameters

Name Type Description
date string | number | Date

The date.

Remarks

You can pass the date to the ScrollToDate method in the following formats:

  • Date

    <script>
        // ...
        clientGantt.ScrollToDate(new Date('December 17, 2020'));
    </script>
    
    <dx:ASPxGantt ID="Gantt" runat="server" ClientInstanceName="clientGantt" >
        //...
    </dx:ASPxGantt>
    
  • Number - Specifies a date as a timestamp (total milliseconds since 1970/01/01).

    <script>
        // ...
        clientGantt.ScrollToDate(1876800000000);
    </script>
    
    <dx:ASPxGantt ID="Gantt" runat="server" ClientInstanceName="clientGantt" >
        //...
    </dx:ASPxGantt>
    
  • String - Specifies a date as a string value.

    <script>
        // ...
        clientGantt.ScrollToDate('01.01.2020');
    </script>
    
    <dx:ASPxGantt ID="Gantt" runat="server" ClientInstanceName="clientGantt" >
        //...
    </dx:ASPxGantt>
    

Note that the ScrollToDate method scrolls to a date inside the current scroll area. You can zoom the chart to resize the viewport.

See Also