TDBAdvEditBtn

I'm using a TDBAdvEditBtn to display a date - with the button click displaying a popup AdvSmoothCalendar.

 
The users want to be able to type a date with just digits (6 or 8), digits and slashes, or use the popup Calendar.  So I need to parse the entry on input rather than just use the AdvDBDateTimePicker.
 
This works fine for XP and Vista - but the control displays the date in American format when run on a Citrix Server.
 
Regional settings for XP and Vista are UK format, and Citrix Server is UK format too.
 
A DBEdit control displays the correct UK date in Citrix Server - so don't know what the DBAdvEditBtn is doing to display the date in American format.
 
Any help would be greatly appreciated.
 
Viv.

TDBAdvEditBtn is not doing anything special with dates. It just holds the value as text. It is unclear what exactly you're doing in code but I can't see anything in the TDBAdvEditBtn component responsible for differences in treating dates related to the OS date format settings. If somehow a problem persists that is really located in TDBAdvEditBtn, please provide sufficient details to allow us to reproduce this here.

Bruno - thanks for the reply.

 
I've tested a TDBAdvEditBtn control using a date field formated with a display format of dd/mm/yyyy on Citrix server.
 
There is no code on this control - just a DBAdvEditBtn with the datasource and datafield set to the field with the UK date format as above.
 
I've also added a DBEdit control and set this to the same date field as the DBAdvEditBtn.
 
The DBAdvEditBtn displays the date in American format - while the DBEdit control displays it correctly as set out in the UK display format for example: Date=27/09/2010 is displayed as 27/09/2010 in the DBEdit control, but as 9/27/2010 in the DBAdvEditBtn control.  Also Date=10/11/2010 is displayed as 10/11/2010 in the DBEdit control, but as 11/10/2010 in the DBAdvEditBtn control.
 
I don't know much about Citrix server, and have just handed over my application to the Citrix Server administrator and found these date issues.
 
As the behaviour only seems to affect the DBAdvEditBtn control I'm a bit stumped as to what to do.
 
The DBAdvEditBtn gives me the flexibility I need for user input as a date, but also the ability to choose a date from a Calendar control.
 
Bruno - do you have access to a Citrix Server machine that you can test your control on - or does anybody else in this forum?  It would be greatly appreciated.
 
Viv.

Can you try to change in DBAdvEdBtn.pas  in the method:


procedure TDBAdvEditBtn.DataChange(Sender: TObject);

change:
self.Text := FDataLink.Field.Text;
to:
self.Text := FDataLink.Field.DisplayText;

and see if this helps?

Bruno - thanks for the fix - it works a treat!!