UNPKG

dhtmlx-suite

Version:

dhtmlx nodejs module

53 lines 1.65 kB
<!DOCTYPE html> <html> <head> <title>Disabling in week mode</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/> <link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/> <script src="../../../codebase/dhtmlx.js"></script> <script> var myCalendar; function doOnLoad() { myCalendar = new dhtmlXCalendarObject("calendarHere"); myCalendar.hideTime(); myCalendar.setDate("2013-03-01"); myCalendar.show(); } function enableDays() { myCalendar.enableDays("week"); } function disableDays(d) { myCalendar.disableDays("week",d); } </script> </head> <body onload="doOnLoad();"> <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:350px;"></div> </body> </html>