Bootstrap - Datepicker/Disable specific dates from array
问题 I have a array with dates. I want to loop this array and disable selectable dates in datepicker control. I need to do this in beforeShowDay parameter! This is my code: var datesForDisable = ["25-01-2017", "26-01-2017", "27-01-2017"] $("#holidayDateFrom").datepicker({ format: 'dd-mm-yyyy', autoclose: true, weekStart: 1, calendarWeeks: true, todayHighlight: true, //datesDisabled: datesForDisable, //daysOfWeekDisabled: [0, 6], beforeShowDay: function (currentDate) { var dayNr = currentDate