Search and Top Navigation
#2672 closed bug (fixed)
Opened April 10, 2008 08:44AM UTC
Closed May 04, 2008 10:45AM UTC
Last modified February 26, 2009 12:05PM UTC
new datepicker timing issue
Reported by: | balliano | Owned by: | iMarc |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.core | 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 (0)
Change History (5)
Changed April 10, 2008 08:51AM UTC by comment:1
Changed April 16, 2008 08:30AM UTC by comment:2
owner: | paul → iMarc |
---|
Changed May 04, 2008 10:45AM UTC by comment:3
resolution: | → fixed |
---|---|
status: | new → closed |
Fixed in r5407, thanks!
Changed May 24, 2008 03:39AM UTC by comment:4
milestone: | 1.2.4 |
---|
Milestone 1.2.4 deleted
Changed February 26, 2009 12:05PM UTC by comment:5
milestone: | → 1.5 |
---|
the right patch is the one in the attached file :-)