Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was 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

Description

@andreiho

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions