Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8664 closed bug (worksforme)

Datepicker position is off when clicked on after scrolling down the page

Reported by: tphelps19 Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.datepicker Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:

Description

I'm a javascript newb I must admit but I'm having a problem with the location of the calendar when it pops up. I've got it on a form element about middle of the page and it works great if click on it without scrolling at all. But if you scroll down the page a bit (assuming there is more stuff on the page) and then try clicking on the input element it doesn't display the calendar in the right spot, it's way off, sometimes even off screen. Hope that makes sense, thanks.

Change History (6)

comment:1 Changed 7 years ago by tphelps19

Oh btw, I just noticed it works great in Google Chrome but not in IE 9 (with or without compatibility mode). Haven't tried IE 8 yet.

comment:2 Changed 7 years ago by tphelps19

On and last thing, I noticed even in Chrome the calendar always pops up on the bottom of the element. If the form element just happens to be at the bottom of the page why not have the calendar pop up on TOP of the element instead? Just the same way contexual menu's work in Windows (it takes into consideration things like the edge of the screen and whatnot). If there is a way to do this already then maybe I'm just not seeing the option for it. Thanks. :)

comment:3 Changed 7 years ago by Scott González

Resolution: worksforme
Status: newclosed

Works just fine for me: http://jsfiddle.net/sCdH7/

comment:4 Changed 7 years ago by tphelps19

That link you posted works for me too, but can I post to you the public link where it's being used so you can see what I'm talking about? Not sure if that's allowed so wanted to check first, thanks.

comment:5 Changed 7 years ago by Scott González

If it's a reduced page, yes. However, if you're going to link to a production site or some other complex page, that is out of scope. Make sure that you're including a proper theme (correct version) and you're using a proper doctype to trigger standards mode.

comment:6 Changed 7 years ago by tphelps19

Just thought I would post what the problem ended up being. It turns out the problem was I didn't have the <!DOCTYPE HTML> at the top of my document. If you take that out then it does not display properly and will do the exact same thing I described before.

Note: See TracTickets for help on using tickets.