-=Apex 20.1=-
Some time back Max published an article on Date picker customization. I'm trying to add those customizations on a date picker column in IG. I've the following function in the "Function and Global Variable Declaration" section to disable all days except Mondays.
function onlyMondays(pDate){
var lTooltipDate = "Select Monday";
if (pDate.getDay() === 1) {
return \[true, null, null\];
}
else {
return \[false, 'disabledDayClass', lTooltipDate\];
}
};

The next thing I did (this is where I'm making a mistake, perhaps) was, assign a static ID to the date picker, create a DA, as shown below, and run a JS.



$(this.affectedElements).datepicker("option", "beforeShowDay", function(date) {return onlyMondays(date);});
The way I'm executing the function may not be accurate for IG, that's why it's not working. Any thoughts on how can this be corrected?
Thanks in advance.
Kashif.