title: Date Picker automatically opens
body: <p>I have a javascript code  using which I want to accomplish the following . I want when i click on the button a form to appear but datepicker's date choosing option not to appear  automatically (but in my case it opens up) . So in other words I wand disable that autoopen . Here is the script </p>
  
  <pre><code>&lt;link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css"     type="text/css"&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"     type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"     type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $("#button").click(function () {
                  var dates2 = $("#datePicker3,#datePicker4").datepicker({
                      autoOpen: false,
                      minDate: 0,
                      changeMonth: true,
                      numberOfMonths: 1,
                      onSelect: function (selectedDate) {
                          var option = this.id == "datePicker3" ? "minDate" : "maxDate",
                              instance = $(this).data("datepicker"),
                              date = $.datepicker.parseDate(
                              instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
                          dates2.not(this).datepicker("option", option, date);
                          calculate_total_price();
                      }
  
                  }); ///
                  $("#order-popup").dialog();
                  $("#order-popup").show();
              });
          });
      &lt;/script&gt;
      &lt;input type="button" value="addclass" id="button"&gt;
      &lt;div id="order-popup" style="display:none;" class="popup-content already-ordered"&gt;
          &lt;input type="text" id="datePicker3" name="datepickerFrom" value=""&gt;
          &lt;br/&gt;
          &lt;input type="text" id="datePicker4" name="datepickerTo" value="" style="margin-top:10px;margin-left:17px"&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>