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

Hotel Room Booking Tutorial with infinite scrolling

Asked by Ruud
2 years ago.


With the hotel room tutorial a custom timeline is created. This is done to create "days" that start at 12:00. I also have this use case. But i also need the infinite scrolling.
Is it possible to combine these two?

I guess that would mean that a new timeline should be created in the onScroll event. But i thought it is not good practice to change config settings(timeline) in the onScroll event.

Do you have any information how to create the 12 to 12 days and use infinite scrolling?


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

The infinite scrolling is only supported for timelines generated automatically (scale !== "Manual"). However, it's possible to adjust the generated time cells using onIncludeTimeCell to achieve the same result:

dp.onIncludeTimeCell = function(args) {
    args.cell.start = args.cell.start.addHours(12);
    args.cell.end = args.cell.end.addHours(12);

This will work fine with infinite scrolling.

The latest sandbox build (2020.2.4515) generates correct time header groups for a timeline that was shifted this way.

Comment posted by Ruud
2 years ago.

yes this works, thank you for the quick reply!

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.