Skip to content

Commit 5a0b7ad

Browse files
authored
fix: datepicker selection works on IE (#623)
1 parent 9410443 commit 5a0b7ad

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/base/src/RenderScheduler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class RenderScheduler {
114114
}
115115

116116
static getNotDefinedComponents() {
117-
return Array.from(document.querySelectorAll(":not(:defined)")).filter(el => el.localName.startsWith("ui5-"));
117+
return Array.from(document.querySelectorAll("*")).filter(el => el.localName.startsWith("ui5-") && !el._isUI5Element);
118118
}
119119

120120
/**

packages/main/src/DayPicker.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,6 @@ class DayPicker extends UI5Element {
255255
onclick(event) {
256256
const target = getShadowDOMTarget(event);
257257

258-
if (target.className.indexOf("sapWCDayPickerItem") === -1) {
259-
return;
260-
}
261-
262258
const dayPressed = this._isDayPressed(target);
263259

264260
if (dayPressed) {
@@ -386,7 +382,7 @@ class DayPicker extends UI5Element {
386382

387383
_isDayPressed(target) {
388384
const targetParent = target.parentNode;
389-
return (target.className.indexOf("sapWCDayPickerItem") > -1) || (targetParent && targetParent.className.indexOf("sapWCDayPickerItem") > -1);
385+
return (target.className.indexOf("sapWCDayPickerItem") > -1) || (targetParent && target.parentNode.classList.contains("sapWCDayPickerItem"));
390386
}
391387

392388
_getVisibleDays(oStartDate, bIncludeBCDates) {

0 commit comments

Comments
 (0)