DHTMLX Docs & Samples Explorer

### Disabling in week mode

| disable mondays
| disable tuesdays
| disable mondays and tuesdays
| disable mondays, tuesdays and thursdays
| clear disabled days

Source

    <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxcalendar.css"></link>
        <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxcalendar_dhx_skyblue.css"></link>
        <script src="../../codebase/dhtmlxcalendar.js"></script>
        <script>var myCalendar;
    function doOnLoad() {
        myCalendar = new dhtmlXCalendarObject("calendarHere");
        myCalendar.hideTime();
        myCalendar.show();
    }
    function enableDays() {
        myCalendar.enableDays("week");
    }
    function disableDays(d) {
        myCalendar.disableDays("week", d);
    }</script>

        <div style="margin-bottom: 20px;">
            <table>
                <tr>
                    <td><input type="button" value="apply" onclick="disableDays(1);"></td>
                    <td>disable mondays</td>
                </tr>
                <tr>
                    <td><input type="button" value="apply" onclick="disableDays(2);"></td>
                    <td>disable tuesdays</td>
                </tr>
                <tr>
                    <td><input type="button" value="apply" onclick="disableDays([1,2]);"></td>
                    <td>disable mondays and tuesdays</td>
                </tr>
                <tr>
                    <td><input type="button" value="apply" onclick="disableDays([1,2,4]);"></td>
                    <td>disable mondays, tuesdays and thursdays</td>
                </tr>
                <tr>
                    <td><input type="button" value="apply" onclick="enableDays();"></td>
                    <td>clear disabled days</td>
                </tr>
            </table>
        </div>
        <div id="calendarHere" style="position:relative;height:250px;"></div>