title: Remove focus from an input field in a jquery dialog
body: <p>I have a button onclick of which a jquery dialog appears with two input fields which are jquery datepickers. Whenever the dialog appears, the first fields gets focus automatically, hence the datepicker pops up. I have resolved this for now by adding another dummy input field. Is there a better way ?</p>
  
  <p>Sorry if the question is repeated. I tried searching for one already existing but couldn't get one. Please point me to an existing question if present.</p>
  
  <p>Edit: </p>
  
  <p>Okay my code goes as follows. onClick of a button the jdialog appears and there are 2 datepicker input fields inside the div "select_date_dialog".</p>
  
  <pre><code>$("#select_date").click(function(){
      $("#select_date_dialog").dialog({
          modal: true,
          dialogClass: 'connect-dialog',
          height: 100,
          width: 500
      });
  });
  </code></pre>
  
  <p>afaik: can you be a bit more specific how blur will help me ? I tried adding this as suggested.</p>
  
  <pre><code>open: function(event, ui) {
                  $('#custom_from_date').blur();
              }
  </code></pre>
  
  <p>blur happens when there input field loses focus. can i use blur to specify whether that field should get focus or not ?</p>