If you need to include a datepicker in a page template or in an hcsp and you won't use jquery, you can use the default UCM calendar with datepicker.
Check the following code as an example:
FROM:<input type="text" id="calendarFrom" />
<img onClick="javascript: pucToggleCalendar('calendarFrom');" border="0" style="cursor: pointer; cursor:hand; vertical-align: middle;" src="images/PopUpCalendar/calendar.png"/>
TO:<input type="text" id="calendarTo">
<img onClick="javascript: pucToggleCalendar('calendarTo');" border="0" style="cursor: pointer; cursor:hand; vertical-align: middle;" src="images/PopUpCalendar/calendar.png"/>
<script type="text/javascript">
pucCreateCalendar({ id: "calendarFrom",caption: "From date"}, "calendarFrom");
pucCreateCalendar({ id: "calendarTo",caption: "To date"}, "calendarTo");
</script>
Pay attention to include "std_checkin_html_head_declarations" in your template ; the static javascript code (with the "pucToggleCalendar" function) used to create the popup is included in that resource:
<$include std_checkin_html_head_declarations$>
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento