In Scott schema, i made a simple data entry form to enter employee.
In hire date column , now user entering date by keyboard, but my manager want to display calender there, so that user can select the date by mouse.
-How to Use the Calendar Class Demo in your Application
1. Install the Demos that come with Oracle Forms
2. Open the Calendar.fmb situated in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
3. Copy the Program Unit: Date_Chosen to your application
4. Get the Object Library: STNDRD20.OLB located in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
5. Get the Attached Library: Calendar.pll located in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
6. Drag the Object Groups: Calendar from calendar.fmb to your application and copy it.
In the item to get the date, in the Key_ListVal trigger enter the following code:
date_lov.get_date(sysdate, -- initial date
's_inventory.text_item5', -- return block.item
240, -- window x position
60, -- window y position
'Start Date', -- window title
'OK', -- ok button label
'Cancel', -- cancel button label
TRUE, -- highlight weekend days
FALSE, -- autoconfirm selection
FALSE); -- autoskip after selection
In either a button when button pressed trigger or on the mouse double-click trigger of the text item that will get the date, enter the following code:
go_block('s_inventory'); --this is the block
go_item('s_inventory.Text_item5'); -- this is the item
do_key('list_values'); --this calls the Key_ListVal trigger of the item