I am from the Czech Republic and we use daylight savings time. Time is changing on 26th March, 2:00 AM. When I create an event in Scheduler and the event crosses the moment when the time is changing, e.g. event lasting from 25th March 5:00 PM to 26th March 5:00 PM, events in the Scheduler renders incorrectly and I get an exception:
Object doesn't support the method innerRect.
The exception is from _positionEvent function.
Interestingly, this problem occurs only when the event lasts exactly 24 hours. When it crosses the changing time moment, but lasts 25 or 23 hours, Scheduler works as expected.
Thanks for replies,
4 Answers, 1 is accepted
Thank you for the detailed explanation provided. As you correctly noted, the observed is a bug in the Scheduler functionality, that is related to the daylight saving change. Therefore, we have included that in our backlog.
Here you will find the GitHub issue, where you could track the bug status.
As a small token of gratitude for reporting to us this bug, I have updated your Telerik points.
Telerik by Progress
thank you for adding Telerik points to my account. I'm glad that I can participate to make the Scheduler better :-)
I've been reading Scheduler source codes and made other observations. It can be helpful in fixing the bug:
The problem occurs only in Day view and Week view. These views have all-day slots on the top of the Scheduler. So I think that the Scheduler is confused about the duration of the event and doesn't know whether to render the event in all-day slot.
Observations made by reading source code:
_positionEvent() is called from _renderEvents().
In _renderEvents() there is a line:
In slotRanges() there is this piece of code:
isDay is computed by means of event.isMultiDay() method:
Because of using getTimeZoneOffset, the event lasts 24 hours and isDay is true.
This means that return this.daySlotRanges(startTime, endTime, event.isAllDay); is executed. It returns objects of type DaySlotRange. These objects don't have innerRect() method.
If isDay would have been false, return this.timeSlotRanges(startTime, endTime); would have been executed. This method returns TimeSlotRange objects, which have innerRect() method.
In _renderEvents() there is also a line:
The difference between end and start time is in this case 23 hours, so isMultiDayEvent is set to false.
Then there is a condition using isMultiDayEvent:
So, in my opinion the problem is in different computation of event duration - once it uses getTimezoneOffset() and the result is 24 hours, once it doesn't use it and the result is 23 hours.
If isMultiDayEvent would be computed with getTimeZoneOffset, the else branch would be used and _positionAllDayEvent() would be called instead of _positionEvent(), which might solve the problem.
Your observations are correct. The issue is caused by the fact, that an AllDay event in this case would have a duration of less than 24 hours. I have also referenced this forum thread in the GitHub issue, so the information provided will be available at the time of fixing the bug.
Again, I have updated your Telerik points because of the effort you put to troubleshoot the case.
Telerik by Progress