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

Bug in Calendar withTimeHeaderCellDuration?

Asked by Paul
11 years ago.

We are observing a likely bug in DayPilotPro-7.1.2730 with TimeHeaderCellDuration. If the TimeHeaderCellDuration doesn't divide evenly into the Calendar Display time range when you have it limited then a js error occurs and no cells are rendered. I presume that this is caused by the partial time range not being handled.

To reproduce:
CellDuration = 20
TimeHeaderCellDuration = 40
Enums.HeightSpecEnum.BusinessHoursNoScroll
BusinessBeginsHour = 8
BusinessEndsHour = 17

This will cause the following js error and no cells will be rendered: TypeError: this.hours[i + this.autoHiddenHours()] is undefined

Changing BusinessEndsHour to 18 will fix the problem. As would changing BusinessBeginsHour to 7.

I haven't verified this, but I'd guess that if you had DayBeginsHour and DayEndsHour set in a similar manner as above, plus Enums.HeightSpecEnum.Fixed, that this would also cause the same problem.

Comment posted by Paul
11 years ago.

Just wondering if there is an update on this issue?

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

The TimeHeaderCellDuration only accepts values that divide 60 without a remainder. There is a check missing, 40 should not be allowed.

If you want to show custom time slots I recommend using the mapping technique demonstrated in the Timetable tutorial:

http://code.daypilot.org/65101/timetable-tutorial-asp-net-c-vb-net

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