sap.m.PlanningCalendar Change Period issue on Islamic
OpenUI5 version: 1.110.0
Browser/version (+device/version): All
When using the sap.m.PlanningCalendar with calendarType set to Islamic, on the built in weekly view, a problem with changing the shown period occurs.
Refer to the picture below as a starting point:

-
When clicking to go to right (the past) the calendar goes two weeks in the past:

-
After a click to the left (in the future) nothing happens and error is thrown.

- Second click changes the week

What is the expected result? Expectation is for the calendar to work normally
What happens instead?
- If button to go in the past is clicked -> the calendar goes two weeks in the past and not only one
- If button to go in the future is clicked -> two clicks are needed
- First clicks throws error
- Second click changes the period (with one week which is expected)
Could you please share a link to a minimal sample to reproduce the error?
Hi There,
I am working on the sample.
Meanwhile, as it may take time, I am sure that this won't be hard to try an use a localised setup for testing.
@malkoto1 Thanks for the sample!
Based on that, here are the steps to reproduce the issue from the Demo Kit sample:
- Open https://sdk.openui5.org/nightly/resources/sap/ui/documentation/sdk/index.html?sap-ui-xx-sample-id=sap.m.sample.PlanningCalendar&sap-ui-xx-sample-lib=sap.m&sap-ui-xx-sample-origin=.&sap-ui-xx-dk-origin=https%3A%2F%2Fsdk.openui5.org&sap-ui-theme=sap_horizon&sap-ui-language=ar_AR&sap-ui-rtl=true&sap-ui-xx-componentPreload=off (From the sample "Planning Calendar - with legend and option to change the first day of week")
- Switch to the following PCalendar settings e.g. via the console:
sap.ui.getCore().byId("__xmlview0--PC1") .setBuiltInViews(["Week"]) .setPrimaryCalendarType("Islamic") .setFirstDayOfWeek(0); - Click on the > button once.
- Click on the < button once.
We can see then the following error afterwards:
Uncaught Error: Date must be in visible date range; Element sap.ui.unified.calendar.DatesRow#__xmlview0--PC1-WeeksRow
- at DatesRow.displayDate (DatesRow-dbg.js:186:10)
- at PlanningCalendar._applyArrowsLogic (PlanningCalendar-dbg.js:981:8)
- at PlanningCalendar._handlePressArrow (PlanningCalendar-dbg.js:953:8)
- ...
- at fnClass.
(PlanningCalendarHeader-dbg.js:315:10) - ...
- at fnClass.eval [as firePress] (ManagedObjectMetadata-dbg.js?eval:801:49)
We can also see the following warning after switching to the Islamic calendar (visible with logLevel >= WARNING):
No calendar customizations. -
The above error, however, occurs also without setPrimaryCalendarType("Islamic").
Hello @malkoto1 , Thank you for sharing this finding. I've created an internal incident 2380032168. The status of the issue will be updated here in GitHub.
Hello all,
Is there any progress on this item?
Hello @malkoto1 ,
We are working on the issue and will update as soon as we have a fix.
Best regards, Petya
Hello @malkoto1,
I've made a fix. It will be available in version 1.115.0, which should release around mid June.
Best regards, Stefan
Fixed with: cb577f8