datetime-picker icon indicating copy to clipboard operation
datetime-picker copied to clipboard

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

Open k4G17eYWI opened this issue 8 years ago • 2 comments

Here an example: image

k4G17eYWI avatar Oct 01 '17 09:10 k4G17eYWI

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 avatar Nov 09 '17 11:11 billublack

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

billublack avatar Nov 13 '17 09:11 billublack