Skip to main content

Search and Top Navigation

#2592 closed bug (fixed)

Opened March 27, 2008 10:11AM UTC

Closed March 27, 2008 02:29PM UTC

Last modified February 26, 2009 12:02PM UTC

jquery.datepicker undefined

Reported by: atlithorn Owned by: paul
Priority: major Milestone: 1.5
Component: ui.core Version: 1.2.3
Keywords: datepicker Cc:
Blocked by: Blocking:
Description

Using datepicker version 3.4. In IE the jquery.datepicker object is undefined in the onload handler for a page we were building. What worked for us was to simply move the singleton instantiation

$.datepicker = new Datepicker()

out of the $(document).ready handler.

So the code now looks like this:

/* Initialise the date picker. */
$.datepicker = new Datepicker(); // singleton instance

$(document).ready(function() {

	$(document.body).append($.datepicker._datepickerDiv).
		mousedown($.datepicker._checkExternalClick);
});

This works perfectly for us.

Attachments (0)
Change History (4)

Changed March 27, 2008 02:29PM UTC by scottgonzalez comment:1

resolution: → fixed
status: newclosed

Already fixed in SVN.

Changed April 07, 2008 10:55AM UTC by kae comment:2

I just fixed a copy of datepicker with probably the same problem.

In my case, I moved the "$.datepicker = new Datepicker();" line to before the "$(document).ready()" line above it.

in my case, the problem was that I was loading the ui.datepicker.js file dynamically, so document.ready() was run before datepicker was added to jQuery.

I believe this is the same problem noted here.

version 3.4.3

Changed May 24, 2008 03:39AM UTC by comment:3

milestone: 1.2.4

Milestone 1.2.4 deleted

Changed February 26, 2009 12:02PM UTC by paul comment:4

milestone: → 1.5