Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment of DateInput calendar broken in relative positioned elements #136

Closed
marceldegraaf opened this issue Aug 13, 2010 · 6 comments
Closed

Comments

@marceldegraaf
Copy link

When using the DateInput plugin on a date-tag whose parent is has "position: relative" the placement of the popup is incorrect. Maybe it is a better idea to place the popup div in the end of the body instead of placing it in the first date-tag's parent?

@tipiirai
Copy link
Contributor

This is now fixed. Here is the commit:

http://github.com/jquerytools/jquerytools/commit/1b98d7b391b323293791e129c52c37e1712c4c93

I already fixed this based on this fork:

http://github.com/Diaren/jquerytools/commit/44b1ad76a070b4f091fc4019948e883b79f9c774

Thank you! This was rather important fix.

@tipiirai
Copy link
Contributor

closing this now.

@eugenebolshakov
Copy link
Contributor

It's great that the dateinput is now placed inside body, but it will be positioned incorrectly if the corresponding input has a relatively positioned parent.

So I think jquery's offset() should be used to get input's position relative to the document (instead of position() that returns coordinates relative to the element's offset parent) when positioning dateinput.

The following commit fixes it: eugenebolshakov/jquerytools@79f873fc9c2adae92e9f86e4a11af51b7cc64fa7

@tipiirai
Copy link
Contributor

you are right. this is now fixed. here is the commit:

http://github.com/jquerytools/jquerytools/commit/af1767dbf0760a4ddfc711f0e6aa98784bbdf803

THANKS!

@wesgarrison
Copy link

@eugunebolshakov : Thanks for the fix, just ran into this issue in 1.2.4, upgrading to 1.2.5 fixed.

@phlegx
Copy link

phlegx commented Feb 4, 2013

No "top" CSS attribute on calroot div tag if used with jQuery version 1.8.x!
The code on line 474 "input.outerHeight({margins: true})" is not valid, it should be "input.outerHeight(true)".

Here the right code:

root.css({ 
     top: pos.top + input.outerHeight(true) + conf.offset[0],
     ...

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants