<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxcalendar.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxcalendar_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcalendar.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);
}
function setTo() {
myCalendar.setSensitiveRange(null, "2011-07-22");
}
function setInInterval() {
myCalendar.setSensitiveRange("2011-07-08", "2011-07-22");
}
function setOutInterval() {
myCalendar.setInsensitiveRange("2011-07-08", "2011-07-22");
}
</script>
<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:250px;"></div>