Enable and disable dates jquery using datepicker : <p>I am using the jquery datepicker. I have set an array of dates which should be disabled, this is working fine:</p>

<pre><code>    var vakantie = ["25-12-2018", "26-12-2018", "27-12-2018", "28-12-2018", "29-12-2018", "30-12-2018", "31-12-2018"];

function nietBeschikbaar(dt){

    var datestring = jQuery.datepicker.formatDate('dd-mm-yy', dt);
    return [dt.getDay() == 1 || dt.getDay() == 2 ? false : true &amp;&amp; vakantie.indexOf(datestring) == -1 ];

};

jQuery("#datepicker").datepicker("option", "beforeShowDay", nietBeschikbaar);
</code></pre>

<p>Now I would also want one date to be enabled (every monday and tuesday is also disabled, but this date is on a monday). With this code I can disable everything except this one date:</p>

<pre><code>    var enableDays = ["24-12-2018"];

function enableAllTheseDays(date) {
    var sdate = $.datepicker.formatDate( 'dd-mm-yy', date)
    if($.inArray(sdate, enableDays) != -1) {
        return [true];
    }
    return [false];
}

jQuery("#datepicker").datepicker("option", "beforeShowDay", enableAllTheseDays);
</code></pre>

<p>But now I would like to combine these two scripts, so I would like to disable the 'vakantie' array, and also enable the 'enableDays' array. I can't get them working togheter, could anyone help me out?</p>
