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

Datepicker views should always open in the same direction when switching between them #6610

Open
andreiho opened this issue Aug 1, 2017 · 0 comments

Comments

@andreiho
Copy link

andreiho commented Aug 1, 2017

Bug description:

When using automatic popup placement and the datepicker is at the bottom of the screen, it is correctly placed on the top instead, because they day view cannot fit to the bottom. However, if you switch to the month or year view, and there is enough space to the bottom to fit these, the popup will be placed again to the bottom. This is frustrating and makes it difficult to pick a date because the popup keeps jumping around. It would be nice if the datepicker maintained the initial direction when switching views, either by default or via a configuration option.

Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/oGeSQcvhIGqQkcT9pDFs?p=preview

Steps to reproduce the issue:

  • scroll down so the popup reaches the bottom of the screen
  • make sure the day view doesn't fit on the bottom, but the month or year view does
  • the day view will automatically open to the top, as expected, and the month view should use the same direction, regardless if it fits in the initial direction or not

Version of Angular, UIBS, and Bootstrap

Angular: 1.6.1

UIBS: 2.5.0

Bootstrap: 3.3.7

Example

kapture 2017-08-01 at 14 55 53

@andreiho andreiho changed the title Datepicker popup views should always open in the same direction Datepicker popup views should always open in the same direction when switching between them Aug 1, 2017
@andreiho andreiho changed the title Datepicker popup views should always open in the same direction when switching between them Datepicker views should always open in the same direction when switching between them Aug 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant