Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Dropdown goes beyond right edge of the page when input close to right edge #218

Open
k4G17eYWI opened this issue Oct 1, 2017 · 2 comments

Comments

@k4G17eYWI
Copy link

Here an example:
image

@billublack
Copy link

A more or less similar issue I am facing here. Popup is overlapping the input field when input is located at the end of the page.
image

@billublack
Copy link

Fixed the above problem. In ng2-datetime-picker.directive.ts file, change this condition:

if (thisElBcr.bottom + ng2DatetimePickerElBcr.height > window.innerHeight) { this.ng2DatetimePickerEl.style.bottom = (thisElBcr.bottom - window.innerHeight + 15) + 'px'; }

to this:

if (thisElBcr.bottom + ng2DatetimePickerElBcr.height > window.innerHeight) { this.ng2DatetimePickerEl.style.top = (thisElBcr.top - ng2DatetimePickerElBcr.bottom + thisElBcr.height) + 'px'; }

It will look like:

image

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

3 participants