I want to un-disable dates in the datepicker, I tried to empty the array of the disabled days, but they are still disabled when I open the datepicker.
Here is my code to disable the days in the datepicker:
$('#startDate').datepicker({
beforeShowDay: function(date) {
var day = date.getDay();
var string = jQuery.datepicker.formatDate('dd.m.yy', date);
return [disabledDays.indexOf(string) == -1];
},
minDate: 0,
dateFormat: 'dd.m.yy',
});
I also tried to add a random number respecting the format, but that didn't change anything.
Maybe there is a way to re-enable the dates or to reinitialize the datepicker so that there are no more disabled dates, but I'm not sure at all.