title: flatpickr: set date of a second date picker to the same date of the first one
body: <p>I'm using flatpikr <a href="https://flatpickr.js.org/" rel="nofollow noreferrer">https://flatpickr.js.org/</a>
  I want on close event of an outbound (only date) picker, to set the initial date of the return picker to the same date selected in the first one.
  I wrote this code which is working, but is not switching to the correct month page, it simply disables all the dates before the selected one in the outbound picker.
  Here you can check what happens in the booking form.</p>
  
  <pre><code>https://anekitalia.com/en/
  </code></pre>
  
  <p>I have tried to use defaultDate instead of minDate in the on close function but it doesn't works.</p>
  
  <pre><code>&lt;script&gt;
   $( function() {
   /*selecting datepiker language*/
   flatpickr.localize(flatpickr.l10ns.en);
   /*declaring return datepicker*/
   var FLATPICKER_RITORNO = flatpickr('#cal_DATA_RITORNO', {
   altInput: true,
   altFormat: "j F, Y",
   dateFormat: "d-m-Y", 
   disableMobile: "true",
   maxDate: new Date().fp_incr(365),
   });
   /*declaring outbound datepicker*/
   $("#cal_DATA_ANDATA").flatpickr(
   {
   altInput: true,
   altFormat: "j F, Y",
   dateFormat: "d-m-Y",
   disableMobile: "true",
   minDate: "today",
   maxDate: new Date().fp_incr(365),
   defaultDate: "today",
   /* setting initial date of return picker to the one selected in 
   outbound*/
   onClose: function( selectedDates, dateStr, instance ) {
   FLATPICKER_RITORNO.set( 'minDate', dateStr)}
   });
   } );
  &lt;/script&gt;
  </code></pre>