search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

position selected event on the center of view port when zoom in/out

Asked by Suman
3 years ago.

I would like to have a feature that when a event is selected and zoom is applied, that event would be positioned to the center of the scheduler view port.


Answer posted by Dan Letecky [DayPilot]
3 years ago.

You can scroll to a specified position using scrollTo() method:

You can get the selected event using

var event =[0];
if (event) {
  var mid = event.start().addTime((event.end().getTime() - event.start().getTime())/2);
  dp.scrollTo(mid, "fast", "middle");
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.