Opened 14 years ago

Closed 13 years ago

#4774 closed bug (fixed)

DatePicker not working on IE6/7/8

Reported by: Infarinato Owned by:
Priority: major Milestone: 1.8
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

When clicking on a text input field associated with a DatePicker instance i.e.

$("#myDiv").datepicker();

IE 6/7/8 all fail to display the calendar and report an "Object doesn't support this property or method" error on line 6616 of jquery-ui.js (it affects v1.7.1, too).

It would seem that replacing the line

var date = defaultDate = this._getDefaultDate(inst);

with the lines

var defaultDate = this._getDefaultDate(inst);
var date = this._getDefaultDate(inst);

solves the problem.

Change History (2)

comment:1 Changed 14 years ago by Infarinato

A small addition that might help clarify the issue…

I have seen reported similar problems, which were subsequently closed as worksforme.

I haven’t double-checked, but think this actually [only?] happens when there is a conflicting jQuery object, e.g. a DIV with id "defaultDate" (N.B. this doesn’t have to be the id of the INPUT field associated with the given DatePicker instance).

Also, for efficiency’ sake the solution should obviously be

var defaultDate = this._getDefaultDate(inst);
var date = defaultDate;

rather than what I wrote earlier. Sorry about the confusion.

comment:2 Changed 13 years ago by Jörn Zaefferer

Milestone: TBD1.8
Resolution: fixed
Status: newclosed

This should be fixed with r3213.

Note: See TracTickets for help on using tickets.