Calendar Control Date Format

Calendar Control Date Format

Postby TimStone » Fri May 21, 2010 9:27 pm

In the tcalenda.prg class, you define the date format to British by default. All of my date lookups are American, but once the calendar is run once, it changes the display throughout the program.

Is there a call to override your default ? If not, there needs to be. I revised it in the source code, but we wouldn't want to do this with every future release. Thanks.
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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Calendar Control Date Format

Postby Daniel Garcia-Gil » Fri May 21, 2010 10:38 pm

Tim...

the calendar is a control from window api, this depend of date format from windows, you can use SET DATE TO AMERICAN

Image

using SET DATE TO AMERICAN

Image

the class not use British format by default, the class use #define DATEFORMAT "dd/mm/yyyy" only for control, for this way the class "know" where is DAY, MONTH and YEAR (always), i mean if you use SET DATE TO AMERICAN, internally the class change to "dd/mm/yyyy" in some methods but after restore to America format again, METHOD SaveDateFormat() and METHOD RestoreDateFormat()
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 100 guests