Calendar Window for a Date Field in Portal 9i/10g
Documents Created by : Bharat Gali
Email : bharat@bharatgali.com
Created date : 26-Jun-2004
Portal Version : 9i/10 G R2
Last Revised :22-Apr-2010
*********************************************************************************
Steps to create a calendar and integrate to oracle portal form (9.x/10.x)
($Oracle_Portal_Home\Apache\Apache\htdocs)
date picker object( Calendar popup).
Navigate to custom layout. In custom layout there will be 3 sections Header, Body and Footer.
Add the following code in header part(or top of the body as shown in the diagram).
<SCRIPT language=JavaScript
src="/cal/CalendarPopup.js"></SCRIPT>
<SCRIPT language=JavaScript>
var cal = new CalendarPopup();</SCRIPT>
Add the following code for the next to the date field (In this case the date field is
<#INV_FROM_DATE.ITEM#>)
<A id=anchor1
onclick="cal.select(document.all('INV5.DEFAULT.INV_FROM_DATE.01'),
'anchor1','MM/dd/yyyy'); return false;"
href="http://bharat.gali.com:7779/calender.js #"
name=anchor1>D</A>
In the above code even though item name is #INV_FROM_DATE.ITEM# the
original name of the field is INV5.DEFAULT.INV_FROM_DATE.01(this will be find out by
view source of the run time form).
Since java script will have problems when the field names contain “.”. the reading of field
should be like document.all('INV5.DEFAULT.INV_FROM_DATE.01') as show in the above
code.
***** Note In the above code http://bharat.gali.com:7779/calender.js means nothing you
can use http://oracle.com . Actually if the implementation fails it goes to specified site.
Final Out of Calender object for a date field.