DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot ASP.NET Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot ASP.NET Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot ASP.NET Scheduler
DayPilot » Knowledge Base » How to get the scrollbar position as date/time (client side)

How to get the scrollbar position as date/time (client side)

Last revision: Mar 8, 2010

Use the following code to get the scrollbar position as DayPilot.Date object using JavaScript (client side) in the Scheduler.

The horizontal scrollbar position can be detected using dps.getHScrollPosition() method.

var scrollX = dps.getHScrollPosition();

The first visible cell start time (DayPilot.Date object) can be extracted using dps.getDate() method:

var cellStart = dps.getDate(scrollX);

The exact time point can be extracted by adding a second parameter:

var scrollDateTime = dps.getDate(scrollX, true);

Controls: Scheduler

Related

How to get the scrollbar position as date/time (server side)
How to show cell Bubble using JavaScript
How to open a new event dialog using TimeRangeSelected event (modal.js)
How to set the time cell colors using database data in the Scheduler