Oracle Forms: How to use a calendar in a Form

 Download Link :

1 - OPEN CALENDER.PLL AND stndrd20.olb

2 - GO TO : Object Libraries > COMPONENTS and click COMPONENTS. Another window appears.

3 - Drag and Drop the COMPONENTS to object navigator.

4 - Now Drag and drop :
    PL/SQL Libraries > Calender >
       DATE_LOV (Package Spec)
       DATE_LOV (Package Body)
    to : Program Units.

5 - Keep the DATE_CONTROL_BLOCK at the bottom of Data Block.

6 - Create a Data Block. e.g. CTRL

7 - Create a Date item   e.g. DT

8 - Create a When Mouse Click Trigger at : CTRL.DT and Past the following code :
 
DECLARE
  XP NUMBER;
  YP NUMBER;
BEGIN
  XP := GET_ITEM_PROPERTY('CTRL.DT',X_POS);
  YP := GET_ITEM_PROPERTY('CTRL.DT',Y_POS);
  DATE_LOV.GET_DATE(SYSDATE,'CTRL.DT',XP,YP,'FORM DATE','OK','CANCEL',TRUE,FALSE,FALSE);
END;



Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post