InvokeCalendar

You can review the details about the invokeCalendar JavaScript function. This JavaScript function invokes the calendar lookup.

Description

The invokeCalendar function assumes that the previous object to the one passed (in the DOM hierarchy of the HTML) is the one that must be populated with the date selected in the lookup.

Note: International calendar formats are supported.

Syntax

invokeCalendar(obj)

Input parameters

obj - Required. Handle to the image object that was selected to invoke the calendar.

Output parameters

None.

Example

This example shows how the Calendar Lookup is invoked from the Horizon End Date field in the Inventory detail view.
 <td class="detaillabel" ><yfc:i18n>Horizon_End_Date</yfc:i18n></td>
 <td class="protectedtext" nowrap="true">
       <input type="text" class="dateinput" onkeydown="return 
checkKeyPress(event)" 
<%=getTextOptions("xml:/InventoryInformation/Item/@EndDate","xml:
/InventoryInformation/Item/@EndDate","")%> />
    <img class="lookupicon"  onclick="invokeCalendar(this);return false"  
<%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON,"View_Calendar")%>/>
    <input type="button" class="button" value="GO" 
onclick="if(validateControlValues())changeDetailView(getCurrentViewId())"/>
 </td>