Possible Duplicate:
problem when cloning jQuery UI datepicker
I have a problem with the jQuery datepicker. I have a div that i clone. That div contains an input element with the jQuery datepicker attached to it.
When i simply clone this element then the datepicker isn’t working on the cloned element. To fix this i had to remove the hasDatepicker class from the cloned input element and re-initialize the datepicker method.
Now the datepicker shows up on the cloned element, but whenever i pick a date, then the date gets placed in the “original” input field instead of the field that opened the datepicker…
Anyone any idea how i can fix this problem..?
Here’s a demo is the problem: http://jsfiddle.net/4VQkg/
Simply clone the element and try to pick a date fron the cloned input field. You’ll see that the data won’t get placed in the desired input field.
try this,
Demo: http://jsfiddle.net/4VQkg/3/
Code: