Fix: TJLabeledDateEdit and TJLabeledDateTimeEdit fix set value for empty dates

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3498 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2014-08-21 15:00:29 +00:00
parent 3fa5fd28ca
commit cdd1073f00
2 changed files with 6 additions and 2 deletions

View File

@ -150,7 +150,9 @@ end;
procedure TJLabeledDateEdit.formatInput; procedure TJLabeledDateEdit.formatInput;
begin begin
if theValue <> 0 then if theValue <> 0 then
Text := FormatDateTime(DisplayFormat, theValue); Text := FormatDateTime(DisplayFormat, theValue)
else
Text := '';
end; end;
procedure TJLabeledDateEdit.SetButtonWidth(AValue: Integer); procedure TJLabeledDateEdit.SetButtonWidth(AValue: Integer);

View File

@ -155,7 +155,9 @@ end;
procedure TJLabeledDateTimeEdit.formatInput; procedure TJLabeledDateTimeEdit.formatInput;
begin begin
if theValue <> 0 then if theValue <> 0 then
Text := FormatDateTime(DisplayFormat, theValue); Text := FormatDateTime(DisplayFormat, theValue)
else
Text := '';
end; end;
procedure TJLabeledDateTimeEdit.SetButtonWidth(AValue: integer); procedure TJLabeledDateTimeEdit.SetButtonWidth(AValue: integer);