Home » Developer & Programmer » Forms » Error on calendar
icon8.gif  Error on calendar [message #225094] Sat, 17 March 2007 06:30 Go to next message
nick048
Messages: 36
Registered: February 2006
Member
Hi to All,

I have implemented the SaadatAhmad Calendar Tutorial.

In my Form I have placed a button that call the Calendar, in order to initialize for example the Item From_Date.
In the trigger WHEN-BUTTON-PRESSED I have the code
DECLARE
	V_X NUMBER;
	V_Y NUMBER;
BEGIN
	V_X := Get_Item_Property('MYBLOCK.FROM_DATE', X_POS);
	V_Y := Get_Item_Property('MYBLOCK.FROM_DATE', Y_POS);
DATE_LOV.get_date (sysdate,
                   'MYBLOCK_FROM_DATE',
                   V_X + 20,
                   V_Y + 20,
                   'Date List',
                   'Confirm',
                   'Cancel',
                   TRUE,
                   FALSE,
                   FALSE);
end;

When I Run the Form and press the calendar button, correctly the calendar is displayed. Dooble click o Confirm button on the desidered date and in the field FROM_DATE appear the date of the current day, instead the date choiced Mad .

I hope that with Your Help I can resolve this problem ?

Best regards
Gaetano
Re: Error on calendar [message #225157 is a reply to message #225094] Sun, 18 March 2007 10:13 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

hi,
Are you sure your code is correct?
'MYBLOCK.FROM_DATE' is ok in this line
V_X := Get_Item_Property('MYBLOCK.FROM_DATE', X_POS);

But what is 'MYBLOCK_FROM_DATE' in 
DATE_LOV.get_date (sysdate,
                   'MYBLOCK_FROM_DATE',  --This is wrong here

According to your code 'MYBLOCK_FROM_DATE' is not an item in the block. It should be
'MYBLOCK.FROM_DATE'

instead of

'MYBLOCK_FROM_DATE'

If you download the form and run it by using scott/tiger, you'll get the correct date selected from the calendar. So there must be something somewhere you have done wrong.
I mentioned one hint here. If your problem is not resolved check for other errors also.
Please check your code again.

regards,
Saadat Ahmad

[Updated on: Sun, 18 March 2007 10:18]

Report message to a moderator

Previous Topic: using cursor with procedure
Next Topic: New enhanced calendar (merged again)
Goto Forum:
  


Current Time: Sat Dec 03 15:52:40 CST 2016

Total time taken to generate the page: 0.03705 seconds