UNPKG

dhtmlx-suite

Version:

dhtmlx nodejs module

64 lines 2.27 kB
<!DOCTYPE html> <html> <head> <title>Sensitive range</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.show(); myCalendar.setDate("2011-07-12"); } function clearRange() { myCalendar.clearSensitiveRange(); } function setFrom() { myCalendar.setSensitiveRange("2011-07-08",null); //myCalendar.setInsensitiveRange(null,"2011-07-07"); // the same } function setTo() { myCalendar.setSensitiveRange(null,"2011-07-22"); //myCalendar.setInsensitiveRange("2011-07-23",null); // the same } function setInInterval() { myCalendar.setSensitiveRange("2011-07-08","2011-07-22"); } function setOutInterval() { myCalendar.setInsensitiveRange("2011-07-08","2011-07-22"); } </script> </head> <body onload="doOnLoad();"> <div style="margin-bottom: 20px;"> <table> <tr> <td><input type="button" value="apply" onclick="setFrom();"></td> <td>set calendar sensitive from specified date (2011-07-08)</td> </tr> <tr> <td><input type="button" value="apply" onclick="setTo();"></td> <td>set calendar sensitive until specified date (2011-07-22)</td> </tr> <tr> <td><input type="button" value="apply" onclick="setInInterval();"></td> <td>set calendar sensitive inside specified dates (from 2011-07-08 - until 2011-07-22)</td> </tr> <tr> <td><input type="button" value="apply" onclick="setOutInterval();"></td> <td>set calendar sensitive out of specified dates (until 2011-07-08 - from 2011-07-22)</td> </tr> <tr> <td><input type="button" value="apply" onclick="clearRange();"></td> <td>clear calendar sensitive data (make all dates sensitive)</td> </tr> </table> </div> <div id="calendarHere" style="position:relative;height:350px;"></div> </body> </html>