I am using jQuery multi datepicker in my html. I need to change the setting property of the date picker dynamically, i.e. When I select the “normal” option in the selection box, I turn off “Saturday” and “Sunday” in my calendar, and when I select the “custom” option in the selection box, I turn off my user days. I do not know how to specify in my code. This is my code.
$('#datePick').multiDatesPicker({ beforeShowDay: disableSpecificWeekDays, // For disabling all "Sundays" dateFormat: "d/m/yy", maxDate: "+3m", minDate: "-1m", multidate: true, addDisabledDates: my_array }); function disableSpecificWeekDays(date) { var theday = date.getDate() + '/' +(date.getMonth() + 1) + '/' + date.getFullYear(); var day = date.getDay(); return [day != 0 && day != 6]; }
Please help me post it?
source share