formatting

git-svn-id: trunk@15247 -
This commit is contained in:
paul 2008-05-27 02:21:20 +00:00
parent c246a4e243
commit 0dd452c02a

View File

@ -331,7 +331,7 @@ type
function GetDate: TDateTime;
function IsStoreTitle: boolean;
procedure SetDate(Value: TDateTime);
procedure CalendarPopupReturnDate(Sender: TObject; Const ADate: TDateTime);
procedure CalendarPopupReturnDate(Sender: TObject; const ADate: TDateTime);
protected
function GetDefaultGlyph: TBitmap; override;
function GetDefaultGlyphName: String; override;
@ -341,17 +341,17 @@ type
constructor Create(AOwner: TComponent); override;
procedure DateFormatChanged; virtual;
function GetDateFormat: string;
property Date: TDateTime Read GetDate Write SetDate;
property Date: TDateTime read GetDate write SetDate;
property Button;
published
property DialogTitle:TCaption read FDialogTitle write FDialogTitle Stored IsStoreTitle;
property DialogTitle: TCaption read FDialogTitle write FDialogTitle stored IsStoreTitle;
property CalendarDisplaySettings: TDisplaySettings read FDisplaySettings write FDisplaySettings;
property OnAcceptDate: TAcceptDateEvent read FOnAcceptDAte write FOnAcceptDate;
property OnCustomDate: TCustomDateEvent read FOnCustomDate write FOnCustomDate;
property OKCaption: TCaption read FOKCaption write FOKCaption;
property CancelCaption: TCaption read FCancelCaption write FCancelCaption;
property ReadOnly;
property DefaultToday: Boolean read FDefaultToday write FDefaultToday;
property DefaultToday: Boolean read FDefaultToday write FDefaultToday default False;
property ButtonOnlyWhenFocused;
property ButtonWidth;
property Action;
@ -893,6 +893,7 @@ end;
constructor TDateEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FDefaultToday := False;
FDisplaySettings := [dsShowHeadings, dsShowDayNames];
DialogTitle := rsPickDate;
OKCaption := 'OK';
@ -940,8 +941,10 @@ function TDateEdit.GetDate: TDateTime;
var
ADate: string;
begin
if FDefaultToday then Result := SysUtils.Date
else Result := NullDate;
if FDefaultToday then
Result := SysUtils.Date
else
Result := NullDate;
ADate := Trim(Text);
if ADate <> '' then
begin
@ -962,8 +965,10 @@ var
begin
if {not IsValidDate(Value) or }(Value = NullDate) then
begin
if DefaultToday then Value := SysUtils.Date
else Value := NullDate;
if DefaultToday then
Value := SysUtils.Date
else
Value := NullDate;
end;
D := Self.Date;
if Value = NullDate then