Skip to main content

Search and Top Navigation

#5981 closed bug (worksforme)

Opened August 23, 2010 02:19PM UTC

Closed January 11, 2011 07:58PM UTC

Last modified October 11, 2012 09:15PM UTC

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:
Description

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

change:

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

to:

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

Changed January 06, 2011 10:39PM UTC by bsdlogical comment:1

_comment0: 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.1294354299724163

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 Firefox or Chrome.

Changed January 11, 2011 07:58PM UTC by scottgonzalez comment:2

resolution: → worksforme
status: newclosed

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

Changed May 02, 2011 10:23PM UTC by chadharris comment:3

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.

Changed June 10, 2011 02:14PM UTC by fr33k4t3k comment:4

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)

Changed August 17, 2011 03:26PM UTC by michaeljsalo comment:5

I'm still encountering scroll to top behavior in one particular case only. The 'date range' example at http://jqueryui.com/demos/datepicker/#date-range. 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.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:6

milestone: TBD

Milestone TBD deleted