We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to adjust the horizontal scrollbar automatically to display the current date at the initial position of the timeline month view?

Platform: ASP.NET MVC |
Control: Schedule

The following steps shows the way to adjust the horizontal scroll value, to display the current date at the initial position of the timeline month view.


Step 1:  Create an MVC application and include the EJMVC Schedule control in it by referring the following KB link,



Step 2:  Define the ActionComplete event of Schedule with appropriate handler, which gets triggered on every successful schedule action completion. 





        .CurrentDate(new DateTime(2016, 10, 25))


        .AppointmentSettings(fields => fields.Datasource(ViewBag.datasource)









            .ScheduleClientSideEvents(evt =>




Step 3: Here, OnActionComplete is an event handler function, within which the code to move the horizontal scrollbar to specific position has been added, so that the current date in the month view is positioned to display first. It is done by checking whether the current request type is ‘viewNavigate’ and also the current view is ‘month’ as shown in the below code example.

function OnActionComplete(args) {

        var scheduleObj = $("#Schedule1").data("ejSchedule");

        var scrollerObj = scheduleObj.element.find('div#' + scheduleObj._id + '_scroller').data("ejScroller");

        if ((!ej.isNullOrUndefined(scrollerObj)) && args.requestType == "viewNavigate" && args.data.currentView == "month") {

            scheduleObj.element.find("div#" + scheduleObj._id + "_scroller").ejScroller({ scrollLeft: (scheduleObj.cellwidth * (scheduleObj.currentDate().getDate() - 1)) });




Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/sample-800205219


Step 4: Run the above sample and the horizontal scrollbar will be adjusted automatically to display the current date at the initial position as shown below.

Month view with adjusted horizontal scrollbar

Figure 1: Month view with adjusted horizontal scrollbar.

2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile