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
I was having a similar problem. I have a jquery datepicker inside a jquery ui dialog. The date picker was opening automatically in IE when I opened the dialog. It was not doing that in Firefox or Chrome... I fixed the problem by disabling the datepicker upon creation in the $(document).ready like so:
$('.ConfirmMove #from').datepicker({
duration: ''
}).datepicker('disable');
Then when I was opening the dialog containing this datepicker I enabled it in the open event handler of the dialog:
$(".ConfirmMove").dialog({
close: function() {
$('.ConfirmMove #from').datepicker('disable');
},
open: function() {
$('.ConfirmMove #from').datepicker('enable');
}
});
You also have to remember to disable it back when you close the dialog.
This way you also don't destroy and recreate the datepicker each time you open and close the dialog.