Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2672 closed bug (fixed)

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 (1)

new code chunk.txt (227 bytes) - added by balliano 15 years ago.
changed a bit after more tests

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by balliano

Attachment: new code chunk.txt added

changed a bit after more tests

comment:1 Changed 15 years ago by balliano

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

comment:2 Changed 15 years ago by paul

Owner: changed from paul to iMarc

comment:3 Changed 15 years ago by paul

Resolution: fixed
Status: newclosed

Fixed in r5407, thanks!

comment:4 Changed 15 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:5 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.