How can I add disabled dates to a multiDatesPicker on the click of a button? I was hoping it would be as easy as this, but it this doesn't work. Any help will be very welcome.
<a href="#" onclick="javascript:addDisableDatesOnClick();">Add Disabled Dates</a>
function addDisableDatesOnClick() {
var dateArray = ["07/10/2018", "07/11/2018"];
$('#mdp-demo').multiDatesPicker("addDisabledDates", dateArray);
}
I found the answer. I had to "destroy" and re-create the multiDatesPicker.