mootools-datepicker icon indicating copy to clipboard operation
mootools-datepicker copied to clipboard

Positioning when using Picker.options.inject

Open RemkoNolten opened this issue 13 years ago • 2 comments

I noticed that positioning is getting a bit off when I use options.inject when creating the DatePicker. This is because the position of the DatePicker is still calculated relative to the body/window.

I suppose it can be easily fixed by changing line 178 in Picker.js: var elementCoords = element.getCoordinates(); To something like: var elementCoords = element.getCoordinates(this.options.inject || document.body);

RemkoNolten avatar Mar 07 '11 09:03 RemkoNolten

Could you provide a testcase, with commit 1a5fa61 I couldn't reproduce it yet.

arian avatar Jul 25 '11 14:07 arian

You can see the test-case here: https://gist.github.com/1104291 The issue arises with the DatePicker class when used in an absolute positioned element.

RemkoNolten avatar Jul 25 '11 14:07 RemkoNolten