Home » Developer & Programmer » Forms » Calendar Problem
icon5.gif  Calendar Problem [message #182451] Sat, 15 July 2006 00:28 Go to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hi!

What is happening in my scenario is that, I've 2 Text Fields, Say 'Day' & 'Date'. When Button_Pressed, Calendar is Called, And it Returns the Date In its Return_Item i.e.DateIn Specific Format as 'Thursday-16-06-2006'.(Day-dd-mm-yyyy)

But I Want The Day (i.e. Thursday)to be returned into Separate Text Field named 'Day'.

Day Should be returned to Day Field And Only Date Should Be returned To Date Field, Whenever I select From Calendar.

Is It Possible or There is some way to do that?

Regards
Qadeer Ahmed.
Re: Calendar Problem [message #182474 is a reply to message #182451] Sat, 15 July 2006 05:14 Go to previous messageGo to next message
Rehan Mirza
Messages: 67
Registered: July 2004
Location: Pakistan
Member

Please attached yours form here so i will change according to yours requirement

take care
Re: Calendar Problem [message #182491 is a reply to message #182474] Sat, 15 July 2006 08:39 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Now i'M Waiting For your Reply
  • Attachment: DateCaln.fmb
    (Size: 248.00KB, Downloaded 1100 times)
Re: Calendar Problem [message #182518 is a reply to message #182491] Sun, 16 July 2006 01:39 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
In the When_Button_Pressed trigger return the date to TWO fields. One has the 'Day' format and the other has the 'dd-mm-yyyy' format.

David
Re: Calendar Problem [message #182540 is a reply to message #182518] Sun, 16 July 2006 15:17 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
David,
How ???
Return date is based on a program unit, and i've written procedure where date is returned to text item in When_Button_Pressed Trigger,
Program Unit Contains the Date Format.
Actually i'm using Calendar.pll

Regards

[Updated on: Sun, 16 July 2006 15:22]

Report message to a moderator

Re: Calendar Problem [message #182542 is a reply to message #182540] Sun, 16 July 2006 18:27 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Next time please post the code that you are using.

Assign the returned value to ANOTHER field using the assignment statement, that is, ':='.

:blk.itm2 := :blk.itm1;
:blk.itm3 := :blk.itm2;
Now you have the same data in three fields. Just put different formats on each field.

David

[Updated on: Sun, 16 July 2006 18:28]

Report message to a moderator

Re: Calendar Problem [message #182692 is a reply to message #182542] Mon, 17 July 2006 10:14 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
DATE_LOV.GET_DATE(SYSDATE, 'BLOCK3.d1', 176,138, 'ROL ON DATE',
'OK', 'CANCEL', TRUE, FALSE, TRUE);

This is the code written when button pressed trigger.
DATE_LOV is the package in Calendar.pll which is not editable.
GET_DATE is the Subprogram of the Package Spec.

Now, How can i make changes, specified by you?? it gives error.

Regards
Re: Calendar Problem [message #182802 is a reply to message #182692] Tue, 18 July 2006 04:53 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Quote:


qadeerahmed wrote on Mon, 17 July 2006 18:14

DATE_LOV is the package in Calendar.pll which is not editable.


I don't think so that it is not editable.

A workaround may be you populate the date in your date1 field and in your date2 field change the property Synchronize with item and synchronize date2 field with date1 field. And also change the format mask of date2 field to your required format mask.

regards,
Saadat Ahmad
Re: Calendar Problem [message #182964 is a reply to message #182802] Wed, 19 July 2006 00:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Other than the synchronize, that's what I thought I said.

Your code:
DATE_LOV.GET_DATE(SYSDATE, 'BLOCK3.d1', 176,138, 'ROL ON DATE', 'OK', 'CANCEL', TRUE, FALSE, TRUE);

My code:
DATE_LOV.GET_DATE(SYSDATE, 'BLOCK3.d1', 176,138, 'ROL ON DATE', 'OK', 'CANCEL', TRUE, FALSE, TRUE);
:block3.d2 := :block3.d1;

Alternatively, synchronize 'block3.id2' to block3.d1'.

David
icon5.gif  Re: Calendar Problem [message #183173 is a reply to message #182451] Wed, 19 July 2006 15:55 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Thanks David & Saadat Ahmed,

But One Problem with David's First Option, is that I've to press the Calendar Button twice to display the Day in :block3.d2.

When I press button First time, Date is displayed in :block3.d1 and when i press it again, then it displays the day in :block3.d2

How that problem can be solved?

Thanks Very Much !
regards
Qadeer Ahmed
Re: Calendar Problem [message #183214 is a reply to message #183173] Thu, 20 July 2006 00:48 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hi,
Now i want to do enable the calendar entries for specific days.
e.g i want to disable all the other days except from date 10 to 19 of the month.

Is there any way to solve this?
Thanks
Regards!
icon5.gif  Re: Calendar Problem [message #183748 is a reply to message #183214] Sun, 23 July 2006 05:10 Go to previous messageGo to next message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hello,
Help Me out in, Restricting the user to select specified dates in a calendar.

David , Saadat , Or any other member.

Thanks
Qadeer
Re: Calendar Problem [message #183760 is a reply to message #183748] Sun, 23 July 2006 06:44 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

I think you shoud do some work yourself before posting the question and if you can't find a work around yourself then post the question here. The members will be delighted to answer your question this way.

Anyway, when you attach the calendar in a form, a block is created named "DATE_BUTTON_BLOCK".
There is a trigger WHEN-MOUSE-DOUBLECLICK on this block.
Open this trigger and you'll find just one line there
date_choosen;

Change this code to
IF to_char(date_lov.current_lov_date,'dd') BETWEEN 10 AND 19 THEN
	date_choosen;
ELSE
        --You can write an Alert here or nothing
	RAISE FORM_TRIGGER_FAILURE;
END IF;


Run the form and verify.

regards,
Saadat Ahmad
Re: Calendar Problem [message #183811 is a reply to message #183760] Mon, 24 July 2006 01:02 Go to previous message
qadeerahmed
Messages: 63
Registered: July 2006
Location: Pakistan
Member
Hi,
Saadat, I'm always used to work by myself first, then i post my query. I did my work around but not succesfull.
Anyways, Thanks For your Help and Comments.

Its done.
Thank You
Regards
Qadeer Ahmed
Previous Topic: Invoke TKPROF from the client machine
Next Topic: How To Solve This ??
Goto Forum:
  


Current Time: Fri Sep 20 09:52:16 CDT 2024