Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: datepicker selection works on IE #623

Merged
merged 1 commit into from
Jul 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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