Ticket #4774 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 5 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 4 years ago by joern.zaefferer

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from TBD to 1.8

This should be fixed with r3213.

Note: See TracTickets for help on using tickets.