• Resolved 1tan1

    (@1tan1)


    Hi,

    Im trying to set minDate:+2 (Disable 2 days from current date). Can you give me the code and is it possible?

    • This topic was modified 8 years, 3 months ago by 1tan1.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter 1tan1

    (@1tan1)

    Just to make sure we’re on the same page.

    Im using datePicker as a booking. I want to block 2 days from current date.

    EG: If i want to make a booking (Today is 10/03/2018) so I can only select “12/03/2018” onward.

    Thread Starter 1tan1

    (@1tan1)

    After going back and forward I finally figured it out.

    WC Fields Factory File Location: wc-fields-factory/includes/wcff-builder.php

    Change:

    if (“past” == $_field[“disable_date”]) {
    echo “,minDate: new Date()”;
    }

    To:

    if (“past” == $_field[“disable_date”]) {
    echo “,minDate: 2”;
    }

    Can you confirm though this is safe? It seems like its working.

    User this modified fields factory.

    https://sarkware.com/wp-content/uploads/2018/03/wc-fields-factory-2.zip

    Refer below images.

    Please review and rate our plugin.

    thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘minDate’ is closed to new replies.