Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Disable all days except Mondays in Date picker calendar in Interactive Grid (IG)

Kashif KhanAug 13 2020 — edited Aug 17 2020

-=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\];

}

};

pastedImage_1.png

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.

pastedImage_4.png

pastedImage_5.png

pastedImage_6.png

$(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.

This post has been answered by Keyser on Aug 15 2020
Jump to Answer
Comments
Post Details
Added on Aug 13 2020
6 comments
2,697 views