Home » Developer & Programmer » Forms » Calender Control in From 6i
|
Re: Calender Control in From 6i [message #111859 is a reply to message #111808] |
Mon, 21 March 2005 06:44   |
rzkhan
Messages: 370 Registered: March 2005
|
Senior Member |
|
|
You will need to files
1) stndrd.olb
2) calendar.pll
******************
1) From within forms open the file stndrd.old via file, open. This will add the item "standards" to the object navigator/object libraries section. This will now always appear in the object navigator.
2) Next open the form that you wish the calendar to be on.
3) Expand the "library tabs" section of the "standards" item in "object libraries" to reveal 5 items, inc. "components". Right click on "components" & select "object libraries" from the menu that appears.
4) From the box that appears select the component "calendar" and drag it to the form you wish it to be added to within the "object navigator". It will then ask whether you want to "sub-class" or "copy". Select copy, or the form with the calendar will not work on PC's that does not have the standards item added. Copying will add all required bits you need for the calendar.
5) Next open the "calendar.pll" file & this will add a "calendar" item to the "pl/sql libraries" section on the "object navigator". Select the "program unit" section and drag it up to the "programs unit" section of your form. This will add 2 items to the "programs unit" section (date_lov - package spec & date lov -package body).
6) Next add a button to call the calendar with a "when_button_pressed" trigger & added this code.
********************************
date_lov.get_date(sysdate,
'cbk.item5', -- return block.item
240, -- window x position
60, -- window y position
'Date', -- window title
'OK', -- ok button label
'CANCEL', -- cancel button label
TRUE, -- highlight weekend days
FALSE, -- autoconfirm selection
FALSE); -- autoskip after selection
********************************
The block.item is where you want the date to be inserted into via the calendar user interaction.
Riaz
|
|
|
|
Re: Calender Control in From 6i [message #235195 is a reply to message #234697] |
Fri, 04 May 2007 05:11   |
rzkhan
Messages: 370 Registered: March 2005
|
Senior Member |
|
|
under the Program Units select DATE_LOV(Package Body)
change the following line
copy(to_char(date_lov.current_lov_date), date_lov.date_lov_return_item);
as
copy(to_char(date_lov.current_lov_date,'dd-mm-yyyy hh:mi'), date_lov.date_lov_return_item);
I have tested it .. it works fine
Thank you,
Riaz
|
|
|
Re: Calender Control in From 6i [message #235846 is a reply to message #235195] |
Tue, 08 May 2007 02:47   |
karthi_smarty04
Messages: 19 Registered: January 2007 Location: COIMBATORE
|
Junior Member |
|
|
thanks for your help..the coding is like this..should i change in all of the following code
package body date_lov is
procedure set_day_labels
is
begin
-- if November 8, 1996 is the fifth day of the week, then
-- display the labels in ISO style with Monday as
-- the first day of the week
-- else November 8, 1996 is the sixth day of the week, then
-- display the labels in American style with Sunday as
-- the first day of the week
if to_char(to_date('11/08/1996','mm/dd/yyyy'),'d') = '5' then
weekend_day1 := 6;
weekend_day2 := 7;
copy(to_char(to_date('11/04/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label1');
copy(to_char(to_date('11/05/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label2');
copy(to_char(to_date('11/06/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label3');
copy(to_char(to_date('11/07/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label4');
copy(to_char(to_date('11/08/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label5');
copy(to_char(to_date('11/09/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label6');
copy(to_char(to_date('11/10/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label7');
else
weekend_day1 := 1;
weekend_day2 := 7;
copy(to_char(to_date('11/03/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label1');
copy(to_char(to_date('11/04/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label2');
copy(to_char(to_date('11/05/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label3');
copy(to_char(to_date('11/06/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label4');
copy(to_char(to_date('11/07/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label5');
copy(to_char(to_date('11/08/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label6');
copy(to_char(to_date('11/09/1996','mm/dd/yyyy'),'Dy'),
'date_control_block.day_label7');
end if;
end set_day_labels;
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Feb 17 21:48:09 CST 2025
|