Skip to content

Commit

Permalink
fix: datepicker selection works on IE (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev committed Jul 4, 2019
1 parent 9410443 commit 5a0b7ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/base/src/RenderScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class RenderScheduler {
}

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

/**
Expand Down
6 changes: 1 addition & 5 deletions packages/main/src/DayPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,6 @@ class DayPicker extends UI5Element {
onclick(event) {
const target = getShadowDOMTarget(event);

if (target.className.indexOf("sapWCDayPickerItem") === -1) {
return;
}

const dayPressed = this._isDayPressed(target);

if (dayPressed) {
Expand Down Expand Up @@ -386,7 +382,7 @@ class DayPicker extends UI5Element {

_isDayPressed(target) {
const targetParent = target.parentNode;
return (target.className.indexOf("sapWCDayPickerItem") > -1) || (targetParent && targetParent.className.indexOf("sapWCDayPickerItem") > -1);
return (target.className.indexOf("sapWCDayPickerItem") > -1) || (targetParent && target.parentNode.classList.contains("sapWCDayPickerItem"));
}

_getVisibleDays(oStartDate, bIncludeBCDates) {
Expand Down

0 comments on commit 5a0b7ad

Please sign in to comment.