jQuery datepicker adds a new attribute to the DOM element in IE. if you try to add a new DOM element dynamically copying from an existing element the datepicker will not work in IE as the newly added DOM element refers to the old jQuery attribute. One way to fix this is to delete the attribute and then instantiate the datepicker class on the element. See the following code for the fix.
//newDiv is the new added dom element with innerHTML jQuery("#newDiv").find(".datePicker").each(function() { //removing jquery added attribute as this is causing the dynamically // added DOM elem referring old DOM element from it is copied. if (jQuery.browser.msie) { var jqaddedattr; jQuery(this.attributes).each(function() { if (this.name.search(/jQuery/) != -1) { jqaddedattr = this; } }); if (jqaddedattr) { jQuery(this).removeAttr(jqaddedattr.name); } } jQuery(this).datepicker({yearRange: '-100:+10', changeFirstDay:false}).val("").trigger('change'); })


Alex says:
Thanks! I was wondering why the jquery attribute was NULL for my dynamically created fields, then I found this post.
February 12, 2009, 11:40 amMarlon says:
Internet Explorer 8 is really good. This browser is very very stable and i have been using it for quite a while without blue screens or crashes.
January 9, 2010, 10:46 pmHailey Hall says:
Internet Explorer 8 is very good because it is as stable as Opera. I hate the previous versions of IE like IE6 because it hangs frequently. “
April 28, 2010, 11:43 amEvie Roberts says:
Internet Explorer 8 have been my most used browser this year, it is definitely stable and fast loading too. .;
May 6, 2010, 12:14 pmMatt says:
IE is the worst browser of ALL TIME!
June 14, 2010, 12:51 pmZachery Beezley says:
article, worthy to command. I’ve found here exactly what I need to know.
August 24, 2010, 5:04 am