cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a SimplePlanningCalendar to a SAPUI5 App failed with getKey Error

0 Kudos

When I add a SimplePlanningCalendar-Control to my app, I got the following Error

I added the calendar with a minimal configuration to my App.

When I debug the app I come to the following line inside the SinglePlanningCalendar.js where a key from the given "vView"-Parameter is requested, but the parameter only holds a String.

Anyone else had this problem before and knows why or how to solve this?

Thank you very much!

Accepted Solutions (1)

Accepted Solutions (1)

former_member751964
Participant
0 Kudos

Hi christiankreipl,

What version of sapui5 are you using? Looks like this bug already fixed in the newest version:

Thanks, Arseni

0 Kudos

Hi Arseni,

I´m on 1.71.21, no fix in this version as I see.

Thank you,

Chris

former_member751964
Participant
0 Kudos

Unfortunately, I can then only suggest adding this fix to your version:

const defaultSetSelectedView = SinglePlanningCalendar.prototype.setSelectedView;
SinglePlanningCalendar.prototype.setSelectedView = function (vView) {
  if (typeof vView === 'string') vView = sap.ui.getCore().byId(vView);
  return defaultSetSelectedView.call(this, vView);
}
Margot
Product and Topic Expert
Product and Topic Expert

It seems that this fix is only available since version 1.75. If this really solves the issue ask for a downport to 1.71. I think this is the fix you need to refer to (either on GitHub or as SAP service ticket).

Answers (0)