Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

fix(datepicker): position on screen #2060

Closed
wants to merge 1 commit into from
Closed

fix(datepicker): position on screen #2060

wants to merge 1 commit into from

Conversation

mtraynham
Copy link

Fixes Bug #1837. This is jqlite compatible.

This solution alters the suggested positioning with the height/width of the popup element. To achieve the offsetWidth/offsetHeight of the popup, I used the jquery trick of setting the display to block which generates the offsetWidth/offsetHeight and then set it back after calculation.

I know there is already a pull request (PR #1838) for this, but it was answered from 2 months ago, required jQuery and also didn't compensate for the left/top and right boundaries.

@RichardLitt
Copy link
Contributor

👍

@chrisirhc
Copy link
Contributor

Thank you for the PR. However, I think this actually moves the popup upwards by y which covers the text field containing the popup. A better approach might be to call $positionElements with top as the positionStr as I mentioned in #1837.

@mtraynham
Copy link
Author

So you're looking for something similar to the tooltip positioning? Regardless on how you solve it, because the date picker popup is a 'display: none' element, you'll have to use the jQuery hackery as I've shown in this pull request to get the height/width of the popup (temp set to display: block).

Then, sure, you could do top/bottom/left/right.

@icfantv
Copy link
Contributor

icfantv commented Oct 28, 2015

Closing in favor of #4762.

@icfantv icfantv closed this Oct 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants