I can make a jQuery datepicker work if the textfield is created when the website is loaded but if I make it appear with a .replaceWith()
function, it wont work.
Here is my code when it just appears when the website is loaded: http://jsfiddle.net/ZnKMX/3/
And here is the code where I create a textfield using replaceWith: http://jsfiddle.net/ZnKMX/4/