Skip to main content

Search and Top Navigation

#7081 closed bug (duplicate)

Opened March 08, 2011 06:34AM UTC

Closed August 13, 2013 08:00PM UTC

datepicker positioning/rendering detection does not work properly if DP is inside a fixed div located at bottom of page and the page is long

Reported by: megamonk Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.datepicker Version: 1.8.10
Keywords: Cc:
Blocked by: Blocking:
Description

im trying to put a date picket inside a fixed div at the bottom of the page (facebook style mini nav).

ex:

<div style='position:fixed; bottom: 0'>
Date: <input type="text" id="datepicker">
</div>

if my page is short, the date picker is rendered above the field and inside the view port. but if the page is long the date picker is rendered outside the viewport and cant even be seen or partially seen. i think this has something to do with how the offsets are detected/computed. here is a sample of the full page which i edited from the demo to recreate the bug. try the date picker while you are on top of the page then try it when you scroll down let say at least in the middle of the page.

Attachments (0)
Change History (6)

Changed March 08, 2011 08:12AM UTC by gnarf comment:1

status: newopen

Changed March 08, 2011 12:40PM UTC by scottgonzalez comment:2

description: im trying to put a date picket inside a fixed div at the bottom of the page (facebook style mini nav). \ \ ex: \ \ {{{ \ <div style='position:fixed; bottom: 0'> \ Date: <input type="text" id="datepicker"> \ </div> \ }}} \ \ \ if my page is short, the date picker is rendered above the field and inside the view port. but if the page is long the date picker is rendered outside the viewport and cant even be seen or partially seen. i think this has something to do with how the offsets are detected/computed. here is a sample of the full page which i edited from the demo to recreate the bug. try the date picker while you are on top of the page then try it when you scroll down let say at least in the middle of the page. \ \ {{{ \ <!DOCTYPE html> \ <html lang="en"> \ <head> \ <meta charset="utf-8"> \ <title>jQuery UI Datepicker - Default functionality</title> \ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> \ <script src="../../jquery-1.4.4.js"></script> \ <script src="../../ui/jquery.ui.core.js"></script> \ <script src="../../ui/jquery.ui.widget.js"></script> \ <script src="../../ui/jquery.ui.datepicker.js"></script> \ <link rel="stylesheet" href="../demos.css"> \ <script> \ $(function() { \ $( "#datepicker" ).datepicker(); \ }); \ </script> \ </head> \ <body> \ \ \ \ \ \ <div class="demo-description"> \ <p>The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p> \ \ <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> \ </div><!-- End demo-description --> \ <div style='position:fixed; background:#999999; bottom:0;'> \ <div class="demo"> \ \ <p>Date: <input type="text" id="datepicker"></p> \ \ </div><!-- End demo --> \ </div> \ </body> \ </html> \ }}} \ im trying to put a date picket inside a fixed div at the bottom of the page (facebook style mini nav). \ \ ex: \ \ {{{ \ <div style='position:fixed; bottom: 0'> \ Date: <input type="text" id="datepicker"> \ </div> \ }}} \ \ \ if my page is short, the date picker is rendered above the field and inside the view port. but if the page is long the date picker is rendered outside the viewport and cant even be seen or partially seen. i think this has something to do with how the offsets are detected/computed. here is a sample of the full page which i edited from the demo to recreate the bug. try the date picker while you are on top of the page then try it when you scroll down let say at least in the middle of the page. \

Changed November 15, 2011 09:19PM UTC by kmudrick comment:3

I ''think'' this is caused by using document.documentElement.clientHeight instead of document.body.clientHeight in all of the offset computation code in the plugin

Changed October 11, 2012 02:43PM UTC by scottgonzalez comment:5

milestone: 1.9.01.11.0

Changed August 13, 2013 08:00PM UTC by tj.vantoll comment:6

resolution: → duplicate
status: openclosed

Duplicate of #5626.This was fixed in 1.8.22 and is a duplicate of #5626.