I am trying to add a calendar as an attribute on my product page.

So far, I got the calendar to show and display properly.

However, I am completely lost on how to disable certain dates on different attributes.

My code are as follow

 You can add parameters like this:


 to disable Sunday = 0 and Saturday = 6 and change it to your liking,
 for instance 0,1,2,3,4,5,6 disables every day of the week.

 If you have more than one pattern of disabled week days, just
 set up another attribute (adding that to the the products you need it on)
 and add another setCalendar to this file.

 e.g.  setCalendar('<<attribute A>>',0,6);     // Disable Saturday & Sunday
       setCalendar('<<attribute B>>',0,1,5,6); // Disable Friday through to Monday

With the above code in a on_call.js file, I am able to disable specific days of the week.

I also modified the following code in scwConfig.js to block specific date
function setCalendar(target)
    if (!document.getElementById(target)) { return false; }

    // Choose your date range
    scwBaseYear      = scwDateNow.getFullYear();
    scwDropDownYears = 2;

    // Choose your date format
    scwDateDisplayFormat = 'mm-dd-yyyy';
    scwDateOutputFormat  = 'mm-dd-yyyy';

    // Disable dates up to and including today
    scwDisabledDates[0] = [new Date(0),
                           new Date(scwDateNow.getFullYear(),

    // Disable dates too far in the future (e.g. 1 month)
    scwDisabledDates[1] = [new Date(scwDateNow.getFullYear(),
                           new Date(scwBaseYear+scwDropDownYears,0,0)
    var ele = document.getElementById(target);
	// Disable Specific Date
	scwDisabledDates[2] = new Date(2020,0,28);

    // Set the attribute to be readonly so that only the
    // calendar can be used to set the date
    ele.readOnly = true;

    // Default the attribute to today's date
  //  ele.value=[scwDateNow.getDate(),
  //             (scwDateNow.getMonth()+1).toString().scwPadLeft(2),
 //              scwDateNow.getFullYear()].join('-');

    // Set the attribute to trigger the calendar with the onclick event

    var args = Array.prototype.slice.call(arguments, 1);

        if (!evt) { evt = window.event; }
        scwShow.apply(this, args);


Hwever, what i am rying to achieve is to block specific date bases on the attributes.

For example, attrib-10-0 pops a calendar with 02-11-2020 thru 02-14-2020 dates and Sundays being blocked

attrib-11-0 has no specific dates being blocked except for every Sundays

Any help will be more than appreciated