title: jQuery UI DatePicker Open on Dialog Window Open
body: <p>I am displaying a jQuery UI dialog window that contains a jQuery UI datepicker control in it.  The problem is that the first form field on the dialog window is the datepicker and thus it receives focus when the window opens up which in turn causes the datepicker window to automatically open.  I don't want this to occur.</p>
  
  <p>I have tried calling</p>
  
  <pre><code>$('#Date').datepicker('hide')
  </code></pre>
  
  <p>in then open function of the dialog window and also after the code that makes the dialog open but it doesn't work as when that code is reached, the datepicker window isn't open yet.</p>
  
  <p>How can I make it so that the datepicker window doesn't open when the dialog window shows up but still have it open when the user clicks on the input?</p>