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

Datepicker displays off the bottom of the screen #1837

Closed
cgastin opened this issue Feb 22, 2014 · 9 comments
Closed

Datepicker displays off the bottom of the screen #1837

cgastin opened this issue Feb 22, 2014 · 9 comments

Comments

@cgastin
Copy link

cgastin commented Feb 22, 2014

Since the popup for the datepicker always displays under the input, this becomes a problem when the input is at the bottom of the screen because the popup for the datepicker displays off the bottom of the screen.

A better solution is to detect the bottom of the screen and re-position the popup above the input.

I have actually modified v0.10.0 to do this, and will be making a pull request to fix this problem.

@RichardLitt
Copy link
Contributor

👍

@chrisirhc
Copy link
Contributor

I think a better fix here would be to add a new method called $position.positionElementsAuto(hostEl, targetEl, defaultPositiion, appendToBody) method which uses $position.positionElements(...) after determining the positionStr by checking whether the element will go out of bounds.

For example, for the datepicker, we would call it with defaultPosition of bottom. If the element will go below the window, the positionStr will be set to top then, the positionElements is called with top (with every other argument kept the same). Similarly for top, left and right.

@gitnik
Copy link

gitnik commented Feb 11, 2015

👍 for this functionality. This renders the datepicker pretty much unuseable

@rvanbaalen
Copy link
Contributor

@cgastin Can you provide a plunkr and confirm this is still an issue in UI Bootstrap 0.13.0?

@rvanbaalen
Copy link
Contributor

Closing due to inactivity. Please re-open if you can provide a plunkr and confirm this is still an issue with Angular 1.3 and UI Bootstrap 0.13.

@cgastin
Copy link
Author

cgastin commented Jun 16, 2015

Here is a plunker demonstrating the problem.

http://plnkr.co/edit/5G45sNCYErtvIqczJRRk

While the scroll bar appears now, and the user can get to the calendar, which I don't believe was the case in earlier versions. When the calendar is going to extend past the bottom boundary of the screen then the calendar should re-position itself to above the input box the same way the datepicker does in Bootstrap.

@cgastin
Copy link
Author

cgastin commented Jun 16, 2015

Since it was closed by the owner, I can not reopen after adding the plunker. Will you reopen, or should I open a new issue.

@wesleycho
Copy link
Contributor

The Plunker is invalid - it was lost somewhere it looks like, and needs another reproduction.

@icfantv
Copy link
Contributor

icfantv commented Oct 28, 2015

Closing in favor of #4762.

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

No branches or pull requests

8 participants