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

Divide day block/cell to more blocks/cells

Asked by Anonymous
5 years ago.

Is it possible to divide block (cell) in hotel scheduler?
Small blocks should represent time period in day.
So if I divide it to 6 smaller block, each block is going to represent 4hours.
Thank you

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

It's possible to set custom cell size using the following settings:

dp.scale = "CellDuration";
dp.cellDuration = 240;   // 240 minutes = 4 hours

See also:

Just note that the hotel room booking tutorial ( uses dp.scale = "Manual" and the cells are generated manually in loadTimeline() function. See also the "Check-In and Check-Out Time" of the tutorial.

Comment posted by Anonymous
5 years ago.

Thanks a lot! I change it to 360 // 6 hours
Then change .addHours to 6.
dp.timeline = [];
var start = date.getDatePart().addHours(6);
It is working, but it seems its loading calendar really slowly

Comment posted by Dan Letecky [DayPilot]
5 years ago.

What DayPilot version do you use?

Since 8.1 SP8 it should be able to handle a very long timeline without bigger performance problems:

The rest of the Scheduler shouldn't be affected much because by default it uses progressive rendering for cells and events (so it doesn't depend on the absolute grid size).

However, if you see a performance drop you may need to use a shorter timeline (e.g. 1 week instead of 1 month).

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