title: Flatpickr: disabled dates by function turns enabled when onValueUpdate is fired
body: <p>My purpose is:</p>
  
  <p>Select multiple dates in order to select holiday days with a maximum of 10 days, not allowing the user to select dates older than today nor weekends.</p>
  
  <p>When I initialize flatpicker with multiple selection and disabled weekends everything looks OK, weekends are disabled, dates that are older than today are disabled too, and I can select multiple dates...</p>
  
  <p>But, when I click on a date, the disabled weekends turns enabled.</p>
  
  <p>Please check this jsfiddle in order to look what I have tried</p>
  
  <p><a href="https://jsfiddle.net/seba1rx/vj695bL3/" rel="nofollow noreferrer">https://jsfiddle.net/seba1rx/vj695bL3/</a></p>
  
  <p>Is this a bug or am I missing something here???</p>
  
  <pre><code>var nr_holidayDays = 10;
  
  $("#dateField").flatpickr({
      mode: "multiple",
      minDate: "today",
      dateFormat: "d-m-Y",
      locale: {
          "firstDayOfWeek": 1 // start week on Monday
      },
      disable: [
          function(date) {
              // return true to disable
              return (date.getDay() === 0 || date.getDay() === 6);
          }
      ],
      onValueUpdate: function(selectedDates, dateStr, instance){
  
          var selectedDatesStr = selectedDates.reduce(function(acc, ele) {
              var str = flatpickr.parseDate(ele, "d-m-Y");
              acc = (acc == "") ? str : acc + ";" + str;
              return acc;
          }, "");
  
          instance.set("enable", [function(date) {
              if (selectedDates.length &gt; nr_holidayDays) {
                  var currDateStr = flatpickr.parseDate(date, "Y-m-d");
                  var x = selectedDatesStr.indexOf(currDateStr);
                  return x != -1;
              } else {
                  return true;
              }
          }]);
      }
  });
  </code></pre>
  
  <p>What I want: </p>
  
  <p>-Be able to select multiple dates.</p>
  
  <p>-Be unable to select dates older than today.</p>
  
  <p>-Be unable to select weekends days (Saturday and Sunday).</p>
  
  <p>-Be able to select a maximum amount of days (10 in this case).</p>
  
  <p>-If maximum amount of days are selected, the rest of days turns disabled.</p>
  
  <p>-In order to select another date when maximum amount of days are selected, deselect one day and days from monday to friday turns enabled, weekends should be disabled, dates older than today should be disabled.</p>