DHTMLX Docs & Samples Explorer

Change parent

Source
<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>
    <style>
        td.td {
            text-align: center;
        }
        div#calendarHere1, div#calendarHere2 {
            position: relative;
            width: 200px;
            height: 250px;
        }
    </style>
    <script>
var myCalendar;
function doOnLoad() {
    myCalendar = new dhtmlXCalendarObject("calendarHere1");
    myCalendar.setDate(new Date(2013, 2, 1, 16, 0));
    myCalendar.show();
}
</script> <table border="1"> <tr> <td class="td"><input type="button" value="Show here" onclick="myCalendar.setParent('calendarHere1');"></td> <td class="td"><input type="button" value="Show here" onclick="myCalendar.setParent('calendarHere2');"></td> </tr> <tr> <td class="td"><div id="calendarHere1" style="position:relative;height:250px;"></div></td> <td class="td"><div id="calendarHere2" style="position:relative;height:250px;"></div></td> </tr> </table>