DateRangeSelection not working for February 2020
OpenUI5 version:
1.85.0
Browser/version (+device/version):
MacOS Chrome/87.0.4280.88 (Official Build) (x86_64)
Any other tested browsers/devices(OK/FAIL):
Windows/Firefox 83.0 OK MacOS/Firefox 83.0 OK
Steps to reproduce the problem:
- Create a view with a sap.m.DateRangeSelection element
- Select February 2021 as month
- Select start and en date
What is the expected result?
The range is selected and returned as value in change listener
What happens instead?
An error is thrown:
Uncaught Error: Date parameter must be a JavaScript Date object: [null].
fromLocalJSDate https://localhost:8443/resources/sap/ui/unified/calendar/CalendarDate.js?eval:314
_updateSelection https://localhost:8443/resources/sap/ui/unified/calendar/Month.js?eval:2283
_selectDay https://localhost:8443/resources/sap/ui/unified/calendar/Month.js?eval:1879
_handleMousedown https://localhost:8443/resources/sap/ui/unified/calendar/Month.js?eval:1496
_handleAfterFocus https://localhost:8443/resources/sap/ui/unified/calendar/Month.js?eval:2075
fireEvent https://localhost:8443/resources/sap/ui/base/EventProvider.js?eval:247
focusItem https://localhost:8443/resources/sap/ui/core/delegate/ItemNavigation.js?eval:596
onmousedown https://localhost:8443/resources/sap/ui/core/delegate/ItemNavigation.js?eval:875
each https://localhost:8443/resources/sap/ui/core/Element.js?eval:325
ui5loader.js line 1668 > eval:314:11
Any other information? (attach screenshot if possible)
The error occurs because the month starts with a monday and has exactly four weeks (28 days).
This results in the fifths row being empty.
This results in the "sapUiCalItem.sapUiCalDummy" dummy element being selected as Day in this line (aDomRefs = oRootDomRef.querySelectorAll(".sapUiCalItem");)
Hello @KeKsBoTer ,
Thank you for sharing this finding. It successfully reproduced using sample: https://jsbin.com/momuyufeco/2/edit?html,output
I've created an internal incident 2080437818. The status of the issue will be updated here in GitHub.
Regards,
Hi @kineticjs,
we are facing the same issue in version 1.84.3!
This is a major problem for us as we are currently in the midst of a customer project implementation and it doesn't work: Now it is February 2021 and they cannot select any time range that includes current data...
Could you please provide a hint when we can expect this to be fixed in 1.84.4 ??
Thank you and kind regards Pablo