title: Automatically set end date on datepicker
body: <p>when you select anything for a start date, the end date should automatically become the same as the start date on a single click in jQuery</p>
  
  <pre><code>var dates = $("#filterDateStart, #filterDateEnd").datepicker({
      dateFormat: "yy-mm-dd",
      changeMonth: true,
      numberOfMonths: 1,
      onSelect: function (selectedDate) {
          var option = this.id == "filterDateStart" ? "minDate" : "maxDate",
                  instance = $(this).data("datepicker"),
                  date = $.datepicker.parseDate(
                      instance.settings.dateFormat ||
                      $.datepicker._defaults.dateFormat,
                      selectedDate, instance.settings);
          dates.not(this).datepicker("option", option, date);
      }
  });
  
  
  var dates1 = $("#filterDateStart1, #filterDateEnd1").datepicker({
      dateFormat: "yy-mm-dd",
      changeMonth: true,
      numberOfMonths: 1,
      onSelect: function (selectedDate) {
          var option = this.id == "filterDateStart1" ? "minDate" : "maxDate",
                  instance = $(this).data("datepicker"),
                  date = $.datepicker.parseDate(
                      instance.settings.dateFormat ||
                      $.datepicker._defaults.dateFormat,
                      selectedDate, instance.settings);
          dates1.not(this).datepicker("option", option, date);
      }
  });
  </code></pre>