How exclude a day (jQuery datepicker + Contact Form 7)

ref. https://wordpress.org/support/topic/how-to-disable-exclude-specific-day-in-date-picker


    [date your-date id:datepicker]
    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/ui-lightness/jquery-ui.css">
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
    <script>
    jQuery(function($){
    $("#datepicker").click(function(e){
         e.preventDefault();
    }).datepicker({
      dateFormat: "yy-mm-dd",
      beforeShowDay: function (date) {
        return date.getDay() == 2 ? [false, " disabled"] : [true, " enabled"];
      }
    });
    });
    </script>
    <style>
    .disabled {
      color: #000;
    }
    .enabled {
      color: #ff0000 !important;
    }
    input::-webkit-calendar-picker-indicator{
      color:red;
    }
    input[type="date"]::-webkit-calendar-picker-indicator {
      -webkit-appearance: none;
    }
    </style>
    [submit "Submit"]

    Post navigation

    You might be interested in...

    No comments yet, be the first!

    Comments

    Your email address will not be published. Required fields are marked *