I have a datepicker which is used within the jQuery dialog object. The source of the dialog\'s content is loaded using .load(). Within the dialog I created a sc
You might want to think about destroying the datepicker when the dialog is closed and creating it in the open event handler for the dialog instead of including it as a script in the dialog creation.
$('#dialog').dialog({
open: function(event, ui) {
$(ui).find('#date').datepicker();
},
close: function(event,ui) {
$(ui).find('#date').datepicker('destroy');
}
});
You could also experiment with different events/methods to see if you really need to recreate it, but I think that this would work.