Hi everybody,
I've been trying various ideas to make the highlighting of the certain days in the Calendar to work. The latest idea I tried was to use enabledDates (as my colleague initially did) and just change disabled class in css.
I was able to change the appearance of these days (I changed the cursor to use pointer), but unfortunately I still cannot select any of these dates when they are not in the enabled array.
Do you know what exactly makes that not-selectable?
<td data-action="selectDay" data-day="02/11/2020" class="day active disabled">11</td>
Is it because we have td with disabled class or there is some extra code in the js itself? I did look into the js code and tried to figure out what may cause this behavior and if there is a simple way to augment it but haven't come to any ideas.
Thanks in advance.
-----------------------
UPDATE. I figured out why it's not selectable and I see I would not be able to change it, so using enabledDates is no go :(
if (isValid(targetMoment)) {
date = targetMoment;
//viewDate = date.clone(); // TODO this doesn't work right on first use
input.val(date.format(actualFormat));
element.data('date', date.format(actualFormat));
unset = false;
update();
notifyEvent({
type: 'dp.change',
date: date.clone(),
oldDate: oldDate
});
}
If it's not broken, fix it until it is.
My Blog