Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#5981 closed bug (worksforme)

DatePicker scroll to top after selection

Reported by: Floyd Owned by:
Priority: major Milestone:
Component: ui.datepicker Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:


If you scroll down in a page, open a datepicker and select a date, the datepicker-plugin scroll to the top of the page.

posible fix:

jquery.ui.datepicker.js Version 1.4.2


Line 1498: '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date


Line 1498: '" href="javascript:;">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date

Change History (6)

comment:1 Changed 12 years ago by bsdlogical

I can confirm this happens in Internet Explorer 7 and 8 with Datepicker v1.8.2. It doesn't happen in Firefox or Chrome. Applying this fix gets rid of the problem for both versions of IE, and doesn't appear to break anything in IE.

Version 0, edited 12 years ago by bsdlogical (next)

comment:2 Changed 12 years ago by Scott González

Resolution: worksforme
Status: newclosed

I can't reproduce this in any 1.8.x version. Had multiple people test.

comment:3 Changed 12 years ago by chadharris

I noticed this problem, and (in my case at least) it was caused by having elements with the same id.

Run your page through the w3c validator and fix all the problems, especially with duplicate id's. Be sure to include the html after all ajax decorating has been done, mine was a duplicate id in an ajax response I was putting in the dialog.

comment:4 Changed 12 years ago by fr33k4t3k

i am using version 1.7.2 of datepicker, i had the same problem with jumping to top of page after date selection in IE7 and IE8; fix works but is in a other line (because of other version)

comment:5 Changed 12 years ago by michaeljsalo

I'm still encountering scroll to top behavior in one particular case only. The 'date range' example at All browsers including Windows Firefox 6 scroll to top upon date selection. Possibly an issue in the example code rather than in the datepicker source code.

comment:6 Changed 11 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.