0

The developer tools show no error message. Works fine on Chrome, Firefox and Safari.

$("#datepicker").datepicker();
console.log($("#datepicker").datepicker("isDisabled")); // prints false
$("#datepicker").datepicker("setDate", new Date());
console.log("here"); // doesn't print at all
Martin G
  • 17,357
  • 9
  • 82
  • 98
Julio Santos
  • 3,837
  • 2
  • 26
  • 47
  • What does the HTML look like? The jQuery UI datepicker definitely works in IE8. – Pointy Oct 15 '10 at 14:08
  • I just edited the question, it's much simpler now. To answer your question, i just have ``. Also, some setup is clearly happening, since I can see the DOM additions made by datepicker. – Julio Santos Oct 15 '10 at 14:13

2 Answers2

0

I didn't realize IE8 even supported the console object. From what I can see, it looks like you need to turn on Developer Tools (F12) to get it to work. Otherwise, console might be causing a JavaScript error which is killing your date picker logic. And make sure you're not using Firebug Lite in IE.

Community
  • 1
  • 1
Tom
  • 22,301
  • 5
  • 63
  • 96
  • -1 The 2nd line prints to console (according to the comment on the source), so I guess IE8 does support it. – ANeves Nov 16 '11 at 13:57
0
var queryDate = '2009-11-06',
dateParts = queryDate.match(/(\d+)/g);
realDate = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
$('#datepicker').datepicker({ dateFormat: 'yy/mm/dd' }); // format to show
$('#datepicker').datepicker('setDate', realDate);

this code will help you..

Krish
  • 15
  • 1
  • 3