Skip to main content

Bug Tracker

Side navigation

#2672 closed bug (fixed)

Opened April 10, 2008 08:44AM UTC

Closed May 04, 2008 10:45AM UTC

new datepicker timing issue

Reported by: balliano Owned by: iMarc
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: datepicker Cc:
Blocked by: Blocking:
Description

hi,

i'm running the datepicker in a full ajax context, also datepicker js/css are not in the document's head but loaded when needed (when the ajax call returns a datepicker widget)

problem comes in js line 1433


/* Initialise the date picker. */

$(document).ready(function() {

$(document.body).append($.datepicker._datepickerDiv)

.mousedown($.datepicker._checkExternalClick);

});

$.datepicker = new Datepicker(); // singleton instance


it happens that $(document).ready is executed BEFORE the "new datepicker" is called, thus I get an error. to solve the problem just move the "new datepicker" inside the $(document).ready:


/* Initialise the date picker. */

$(document).ready(function() {

$.datepicker = new Datepicker(); // singleton instance

$(document.body).append($.datepicker._datepickerDiv)

.mousedown($.datepicker._checkExternalClick);

});


Attachments (1)
  • new code chunk.txt (0.2 KB) - added by balliano April 10, 2008 08:50AM UTC.

    changed a bit after more tests

Change History (3)

Changed April 10, 2008 08:51AM UTC by balliano comment:1

the right patch is the one in the attached file :-)

Changed April 16, 2008 08:30AM UTC by paul comment:2

owner: pauliMarc

Changed May 04, 2008 10:45AM UTC by paul comment:3

resolution: → fixed
status: newclosed

Fixed in r5407, thanks!