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.
Unfortunately, activation email could not send to your email. Please try again.

How to set the scroll position of Scheduler based on the current time?

The initial scheduler view can be set to display its work area based on the current time indication or any other specific user-defined time. If the user wish to auto-scroll the initial screen based on the current system time, follow the below steps,

Step 1:  Create a schedule default sample with JSON data. Also, add and refer the required scripts and stylesheets to it by referring the following link.

Sample Location: http://jsplayground.syncfusion.com/ufe2cbm0

Step 2: Define the create and actionComplete event for Scheduler with appropriate handler. These two events were used specifically because - when any of the scheduler action (like appointment creation, view/date navigation) completes and also during the initial rendering of the scheduler, the scroller within the scheduler will be positioned every time based on the current time indicator.

JavaScript

 

Step 3: currentTime is a function within which the code to handle the exact scroller position based on current time Indicator is defined. The following code example shows the logic to position the scroller,

 

Step 4: Run the sample and now you can view the Scheduler view showing off from the time 9.00 AM, as the current time of the system points to that time. The user can also view the current time indicator position on the Scheduler as depicted in the below image,

 Figure 1: Scheduler area scrolled to the position based on current time indicator.

 

Article ID: Published Date: Last Revised Date: Platform: Control:
6445 03/01/2016 03/01/2016 JavaScript ejSchedule
Did you find this information helpful?
Comments
Vivek Sharma Jan 25, 2017
How can we achieve the same if our schedule is set horizontol?
Reply
Add Comment
You must log in to leave a comment

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.