There are several ways of Calendar initialization on a page. The most common of them are presented below:
<div id="box" style="position:relative;height:250px;"></div>
<script>var myCalendar = new dhtmlXCalendarObject("box");
myCalendar.show();
</script>
<input type="text" id="calendar">
<input type="text" id="calendar2">
<script>var myCalendar = new dhtmlXCalendarObject(["calendar","calendar2"]);
</script>
formData = [
{type:"calendar", label:"Start Date", skin:"dhx_skyblue", enableTime:true,
dateFormat:"%Y-%m-%d %H:%i"},
{type:"calendar", label: "End Date", skin:"dhx_skyblue",
dateFormat: "%Y-%m-%d"}
];
myForm = new dhtmlXForm("myForm", formData);
To learn about other ways of initialization and get more detailed information, read the chapter "Initialization".
Back to top