title: jQuery Datepicker UI close only on click of close button or done button
body: <p>I am using jQuery UI Datepicker,..</p>
  
  <p>Datepicker works fine but it gets closed when we click outside of the calender or when we click the <kbd>Escape</kbd> button. But I want my date picker to be closed only when we click The done button.</p>
  
  <pre><code>$(".date-picker").datepicker({
      dateFormat: 'mm-yy',
      changeMonth: true,
      changeYear: true,
      showButtonPanel: true,
  
      onclose: function(dateText, inst) {
          var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
          var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
          $(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
      }
  });
  </code></pre>
  
  <p>How can I do this?</p>