Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datetime picker 1

Status
Not open for further replies.

advsoft

Programmer
Apr 20, 2004
5
GT
I need to use the datetime picker in a form, but i need to input a maxium and minim date to the picker.

Any idea ?

Thanks


"Necesito usar el control datetime picker en una forma, pero necesito ingresar un valor maximo y minimo para las fechas que pueda mostrar el control.

Alguna Idea ?

Gracias
 
How about just two instances of the MS date picker control?

Otherwise, you'll need to create (or find) a "calendar" that allows you to pick multiple dates. I believe one of the DBI Technologies Inc. Calendar Tools 3.0 would probably qualify. (
Rick
 
Rick,

I get the impression advsoft wants to limit the date range.
If that's the case, you can use the MinDate and MaxDate properties of the control either by right-clicking on it and selecting 'DTPicker Properties' at design time, or at run time by issuing a command something like:
Code:
MyForm.oleDTPicker.object.MinDate = Date() - 30
MyForm.oleDTPicker.object.MaxDate = Date() + 30


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Dave, thats exactly what i want to do, but the control dont show me that properties.

The control is Microsoft Date and Time Picker Control 6.0 (SP4)
 
Uhhh, that's the same version I'm using.

From within the form designer you may be right-clicking and selecting 'Properties'. That isn't the correct selection.
You need to select 'DTPicker Properties' - the last selection on the list when right clicking.

Or you can change it at run time using the example I gave.
Note that a full month will still be displayed, so if you for instance set MaxDate to DATE() + 1 and MinDate to DATE() - 1, you will still see the entire current month, but the user will only be allowed to select a day within the valid range. Which in this case would be the current day, yesterday and tomorrow.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
AdvSoft,

You can get an excelent calendar control with full VFP source code from "Controles Comunes", download it from PortalFox
Note: I'm not affiliated in any way with Portalfox.

Gerardo Czajkowski
ltc.jpg
 
Thanks Dave,
It's sometimes amazing how your current projects can influence your reading of a given question (and answer).

It's good that advsoft had you to understand what he really needed.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top