Unexpected error of PlanningCalendar after version upgrade
OpenUI5 version: 1.87.0
Browser/version (+device/version): Latest Chrome and Latest Firefox
URL (minimal example if possible): Cannot provide
We have application using PlannigCalendarControl. Our current version is 1.81.1. If we upgrade to 1.87.0 error is thrown.
Steps to reproduce the problem:
- Just upgrade version from 1.81.1 to 1.87.0
What is the expected result? Expected is everything to work.
What happens instead? Error "CalendarUtils-dbg.js:139 Uncaught TypeError: Cannot read property 'getTime' of undefined"
Any other information? (attach screenshot if possible)

Hello @malkoto1, As this issue cannot be reproduced by the provided information, to help us analyze it can you provide a minimal example to reproduce in e.g. jsbin: isolate the application code which triggers the issue and strip it down as much as possible as long as the issue still occurs if several files are required, you can create a gist. Best Regards, Konstantin
I cannot isolate it, but I have isolated the versions where it starts to show:
I can upgrade up to 1.81.7 and if I try to go to 1.82.0 the error starts to show.
Maybe you can point me what has happened between 1.81.7 and 1.82.0?
Hello @malkoto1, We found a change that might be the cause of the issue in the _focusDateExtend method of the CalendarDateIntervalMethod the old method was:
CalendarDateInterval.prototype._focusDateExtend = function(oDate, bOtherMonth, bNoEvent) {
if (bOtherMonth) {
var oOldStartDate = this._getStartDate(),
oNewStartDate = new CalendarDate(oDate.getYear(), oDate.getMonth(), oOldStartDate.getDate(), this.getPrimaryCalendarType());
this._setStartDate(oNewStartDate, false, true);
if (!bNoEvent) {
return true; // fire startDateChange event in caller at end of processing
}
}
return false;
Can you please check If this can help you solve the issue, if not we will need more information like
- Detailed steps to reproduce the problem
- Debugging information etc.
Best Regards, Konstantin
Hi,
I put a breakpoint in that method and my code is not reaching it before the error.
I am binding data az in the example. The only difference is that instead of provideing a Date object directly I am providing an ISO Date string and am parsing it like this: startDate="{path:'managedEmployees>start', formatter:'.parseDateTime'}"
Is there a possibility that you have changed something in that logic?
Hello @, I have discussed this issue with the responsible team and created an internal incident 2170074748. The status of the issue will be updated here in GitHub. Regards, Konstantin
Hi there,
Is there any update here?
Kind Regards, Radoslav
Hi malkoto1,
a colleage send me the recording of your debugging session. We're discussing it internally, but we need more infos. Could you please try again and put a breakpoint in CalendarUtils#106, after the oUTCDate instantiation?
Also FYI sap.ui.unified.Calendar.CalendarUtils._createUniversalUTCDate(..) was undefined because you need to use a lower-captial c: sap.ui.unified.calendar.CalendarUtils._createUniversalUTCDate(..)
Best Regards, Oliwer
Hi,
I have managed to get to the point where oUTCDate is undefined in the CalendarUtils._createUTCDate function. I am attaching screenshots from the stack trace in a zip. You can see on the last one that one of the events has lost its startDate and endDate (at least this is my suggestion).
These are made with 1.88.0 version.
After this the error in the beginning of the ticket was thrown.
Hello,
Is there any movement here?
Kind Regards, Radoslav
Hi malkoto1, we are discussing your issue internally... We do not have any update at the moment...
Best regards Alex
Hi Alex,
After a short screensharing session with a colleague of yours, Boyan, we concluded where the problem might be.
As our setup is difficult, I can offer to meet with someone from the team that seemed to know where might the issue be.
Kind Regards, Rado
Hello @malkoto1 ,
Can we make a new meeting, to re-check the issue and investigate the problem, as the setup is not easy.
Thanks and Best Regards, Tsanislav
Hi,
Yes, let's do that.
For more convenience, let's move the conversation to our mailboxes. Please send convenient slots for such a meeting on [email protected].
Kind Regards, Radoslav
Hello,
As we spoke in our meeting, you said that you will check the reason of creating the appointments/interval headers with no start/end date. As on our end, we don't have major changes between the pointed versions. This might be if we just worked faster in the newer version and the information wasn't yet loaded by your application.
Can you please update if you have update on your research?
Best Regards, Tsanislav
Hi @malkoto1 I'll close this issue due to inactivity. If you have an update on Tsanislav's response, feel free to comment again and we'll reopen the issue.
Regards, Georgi
Hi,
We managed to fix the problem. We were giving all out dates in ISO string format which at some point was failing. We just removed everything that was different from Date object and everything is okay now.