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;
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;
Tags:
Oracle Developer