datepicker (exclude a day)


    [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{
         /* display: none; */
    }
    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 *