FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Date Picker
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Date Picker
Posted: Wed Dec 26, 2007 06:14 PM

Consider:
REDEFINE DTPICKER cDate ID 1001 OF oDlg

This control calls the windows API and displays a date icon in the edit field. When clicking on the date icon, a window control pops up that allows me to navigate, and select, a date. It returns the date value.

So here is my question. Is there a way to call a calendar control. which I can display on a dialog, and which does not use the edit field. I want the control to simply return the selected date.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Date Picker
Posted: Wed Dec 26, 2007 07:04 PM

Just put a button that calls a calendar, for example, via open or fivewin´s internal, next to the field you want.

regards,

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Calendar
Posted: Thu Dec 27, 2007 12:39 AM

I don't want a button to call a calendar. FWH does that with its DTPICKER option. I want the calendar to display, ie. Outlook, and when I click a date, it provides that date to the function ( a static variable which it changes ) and I can then display data on my dialog screen.

DTPICKER allows a calendar to be displayed, but once you select a date, it goes into an edit control and the calendar disappears. I want the calendar on constant display for quick movement between dates.

I had this ability previously with a function from Grumpfish, but I wanted to clean it up a bit with a 32 bit look and feel.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Date Picker
Posted: Mon Dec 31, 2007 03:24 AM

Probably not what you want, but here it is anyway. This is a highly modified version of the old FiveCald.prg with a Schedule.rc dialog resource to go with it. This does basically the same as datepicker, with a few refinements and with a bit larger dialog for better readability. However, here you have all the source so you can probably make it do whatever you want. Download the two files in a zip file named fivecald.zip from...

http://www.leadersoft.com/software/fivecald.zip

Good luck. - Roger

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Date Picker
Posted: Tue Jan 01, 2008 08:17 AM
Hello Tim,
is it that what you are looking for?


if yes, than try this:

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Date Picker
Posted: Tue Jan 01, 2008 09:24 AM

Yes. Atleast thats what I am looking for. It is calendar control. FWH does not yet have it.

Regards



G. N. Rao.

Hyderabad, India
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Date Picker
Posted: Tue Jan 01, 2008 03:15 PM


Here is FiveCald available from URL on my prior post. Features:

- Name of date field is included on titlebar to avoid confusion when more than one date field used on a screen

- current date highlighted in bold & italic

- can navigate forward/backward by month or year

- click on a day to select it and auto-insert it into date field

- automatic correct calculation of calendar for any year, including leap years

- click <Cancel> to abort date selection

- complete source provided plus .RC for calendar dialog
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Calendar
Posted: Wed Jan 02, 2008 04:55 PM

Otto & Roger,

Otto,

That is a control that pretty well matches the 32 bit environment. Yes, it is what I would work.

Roger,

That is an older style calendar. I have been using that but wanted to replace it.

The control must be OK for a dialog ... using it only on a window doesn't work out because some of the other controls need a dialog and won't work properly on a window. I've tried both approaches. I have everything working perfectly on the dialog EXCEPT for a viable calendar control. I need the calendar to display all of the time, not just as a date field popup ( DTPICKER ).

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Date Picker
Posted: Wed Jan 02, 2008 07:21 PM

Hello Tim,
I saw that in the res-file
SysMonthCal32 is used.

Fivewin uses in DTPicker
::Create( "SysDateTimePick32" )

Maybe if you make a new class like the one tDTPicker it should work. Not tested.
Regards,
Otto

Def CreateMonthCal(7) Control("SysMonthCal32" ,"",&(7),%(2),%(3),%(4),%(5),&(1),%(6),%hinstance)
Def CreateDateTimePicker(7) Control("SysDateTimePick32","",&(7),%(2),%(3),%(4),%(5),&(1),%(6),%hinstance)

Continue the discussion