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

Comments

Projects
None yet
5 participants
@marceldegraaf

marceldegraaf commented Aug 13, 2010

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

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 15, 2010

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.

Contributor

tipiirai commented Aug 15, 2010

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

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 15, 2010

Contributor

closing this now.

Contributor

tipiirai commented Aug 15, 2010

closing this now.

@eugenebolshakov

This comment has been minimized.

Show comment
Hide comment
@eugenebolshakov

eugenebolshakov Sep 2, 2010

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@79f873f

Contributor

eugenebolshakov commented Sep 2, 2010

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@79f873f

@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Sep 11, 2010

Contributor

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

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

THANKS!

Contributor

tipiirai commented Sep 11, 2010

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

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

THANKS!

@wesgarrison

This comment has been minimized.

Show comment
Hide comment
@wesgarrison

wesgarrison Sep 23, 2010

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

wesgarrison commented Sep 23, 2010

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

@phlegx

This comment has been minimized.

Show comment
Hide comment
@phlegx

phlegx 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],
     ...

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