$('.datepicker-here').datepicker({
onRenderCell: function(date, cellType) {
if (cellType == 'day' && date.getDate() == 3) {
return {
classes: 'my-class',
disabled: true
}
}
}
});
const $picker = $('.datepicker-here');
$picker.datepicker({
onRenderCell(date, cellType) {
if (cellType === 'day') {
const picker = $picker.data('datepicker');
const selectedDate = picker && picker.selectedDates[0];
if (selectedDate && date > selectedDate && date <= +selectedDate + 86400000 * 3) {
return {
disabled: true,
};
}
}
},
});