Support » Plugin: Product Delivery Date for WooCommerce - Lite » Disable Saturday and Sunday

  • Resolved toddperrow

    (@toddperrow)


    I have been able to disable only Sunday using code from another thread however need to disable both Saturday and Sunday. Is this Possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor MoxaJogani

    (@moxajogani)

    Hi,

    Can you please let me know what code you have used to disable Sunday in the calendar? I think you can use same code for disabling Saturday too.

    Let me know.

    Regards,
    Moxa Jogani

    This is the code I’m using:

    beforeShowDay:function(date) {
    var day = date.getDay();
    if( day != 0 ) {
    return [true];
    } else {
    return [false];
    }
    }

    Plugin Contributor MoxaJogani

    (@moxajogani)

    Hi,

    You can use the below code to disable Saturday and Sunday in the delivery date calendar on the frontend product page.

    beforeShowDay:function(date) {
         var day = date.getDay();
         if( day == 0 ) {
             return [false];
         } else if( day == 6 ) {
             return [false];
         } else {
             return [true];
         }
    }

    Let me know if you have any further queries.

    Regards,
    Moxa Jogani

    Thank you very much, all working as hoped.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable Saturday and Sunday’ is closed to new replies.