Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about Calendar OCX
Message
From
23/02/1998 23:15:50
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00080502
Message ID:
00080673
Views:
30
>>I have a question for you about the Calendar and how you are using it.
>>I have a form where a starting date and ending date need to be entered.
>>I would like to give them the option to pop up the calendar to select the dates.
>>Questions are:
>>1) How do you have the calendar activated? With a command button which calls a
>> form that has the calendar in it? or is it on the current form?
>>
>>2) How do you specify which textbox gets the date from the calendar?
>>
>>I can do this in a 2.6 screen but I'm still have problems changing over to VFP5.
>>
>>Thanks
>
>Andy,
>
>FWIW, here's the way I do it -- I created a little form called GetCalendarDate which has the calendar control on it, plus an OK and a CANCEL button. The form accepts an optional date parameter as the starting date, otherwise it defaults to DATE( ). The form's unload event returns the date the user chose, or the starting date if they clicked CANCEL.
>
>To use it on a form, I usually put a small command button with a graphcial calendar icon next to each date field on the form. The click event of the command button does a "DO FORM GetCalendarDate WITH [optional date parameter] TO [the date field.value]" so the return value ends up in your date field text box. GetCalendarDate needs to be modal so this will work.
>
>The code in the click event of the command button needs to be changed to point to the correct date field (the TO parameter) in each case. But the GetCalendarDate form itself works as a black box.
>
>If anybody's interested in it, I'd be glad to see about uploading it to the files section.
>
>HTH,
>Rick

Yes I am interested. You can attaach it to an email as long as it's less than 2 megs. to: andyroth@electriciti.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform