All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientGantt.ScrollToDate(date) Method

Scrolls the Gantt chart to the specified date.

Declaration

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

Parameters

Name Type Description
date Date | string | number

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