Xin Calendar 2 Example: Static calendar
The In-Page version supports popup calendar and static calendar. Static calendars will stay visible once shown. We can use [ null ] for both date fields in the showCalendar() call if we don't want to associate a static calendar to some input fields.
Usually we set up the showCalendar() calls for static calendars with the BODY onload event:
<body onload="showCalendar('', null, null, '', 'holder', 10, 30, 0)">
or we can put it this way when we don't want to touch the BODY tag:
<script language="javascript"> function showStaticCalendar() { showCalendar('', null, null, '', 'holder', 10, 30, 0); } window.onload=showStaticCalendar; </script>
The only difference in calling a popup calendar and a static calendar is just the last parameter in the showCalendar() call, use 1 to get a popup calendar and use 0 (zero) to get a static one. Of course, though we can we don't usually position a static calendar with mouse clicks.
We can have more than one static calendar in the page, the [ xcMultiCalendar ] setting in the config file would only apply to popup calendars. In the example, the first calendar has a default date of 2004-07-01.
[Start date & end date] [Back to index page]
# # #