I initialize a datepicker inside
<div id="dialog" style="display:none">.
Then I do
$("#dialog").dialog({modal:true, draggable:false, resizable:false});
As the result the dialog opens with the datepicker in active state that is with visible drop-down calendar (because it gains focus).
How to prevent activating the datepicker by .dialog() method?
Hm, or maybe it would be better not to activate it? (The reason is that this way the text input for the date would be focused and clicking it would not open the datepicker. This is also bad.)
What is a good way to deal with this?