View Single Post
Old 09-25-2012, 11:57 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Regarding the datepicker: The code for the datepicker looks for all elements with that given class WHEN THE PAGE IS LOADED. It attaches AT LEAST an onclick event handler to each such element.

When you add a row dynamically, you don't notify the date picker that there is a new element with that class, so it doesn't have a chance to attach the needed onclick handler.

Cloning the HTML of the elements does *NOT* clone the event handlers for those elements.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote