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

Datepicker placement in IE11 #471

Closed
smtoneill opened this issue Dec 12, 2018 · 0 comments
Closed

Datepicker placement in IE11 #471

smtoneill opened this issue Dec 12, 2018 · 0 comments
Labels

Comments

@smtoneill
Copy link

In IE11, the Datepicker widget is overlapping the input control as shown:

example

It looks like the element height is being incorrectly reported to setChildPosition from the height function for mainEl. height uses window.getComputedStyle to calculate the height but it does not look like that respects border-box within IE (see this StackOverflow question). getBoundingClientRect does seem to report the correct values for the element and I was able to hack a simple fix by replacing mainElHeight with mainElRect.height:

if ((mainElRect.top + mainElHeight + childElHeight) > window.innerHeight && mainElRect.top > childElHeight) {
    childEl.style.top = Math.round(mainElRect.top + scrollY - childElHeight - 3) + 'px';
} else {
    childEl.style.top = Math.round(mainElRect.top + scrollY + mainElRect.height + 3) + 'px';
}
@atatanasov atatanasov added the bug label Dec 13, 2018
atatanasov pushed a commit that referenced this issue Dec 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants