From cdd1073f00d4dfd713e3d6310e93cd3b3543cfd5 Mon Sep 17 00:00:00 2001 From: jujibo Date: Thu, 21 Aug 2014 15:00:29 +0000 Subject: [PATCH] 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 --- components/jujiboutils/src/jlabeleddateedit.pas | 4 +++- components/jujiboutils/src/jlabeleddatetimeedit.pas | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/jujiboutils/src/jlabeleddateedit.pas b/components/jujiboutils/src/jlabeleddateedit.pas index d1fe47e3b..ec9c3a620 100644 --- a/components/jujiboutils/src/jlabeleddateedit.pas +++ b/components/jujiboutils/src/jlabeleddateedit.pas @@ -150,7 +150,9 @@ end; procedure TJLabeledDateEdit.formatInput; begin if theValue <> 0 then - Text := FormatDateTime(DisplayFormat, theValue); + Text := FormatDateTime(DisplayFormat, theValue) + else + Text := ''; end; procedure TJLabeledDateEdit.SetButtonWidth(AValue: Integer); diff --git a/components/jujiboutils/src/jlabeleddatetimeedit.pas b/components/jujiboutils/src/jlabeleddatetimeedit.pas index 0471364cf..bcbfa39a2 100644 --- a/components/jujiboutils/src/jlabeleddatetimeedit.pas +++ b/components/jujiboutils/src/jlabeleddatetimeedit.pas @@ -155,7 +155,9 @@ end; procedure TJLabeledDateTimeEdit.formatInput; begin if theValue <> 0 then - Text := FormatDateTime(DisplayFormat, theValue); + Text := FormatDateTime(DisplayFormat, theValue) + else + Text := ''; end; procedure TJLabeledDateTimeEdit.SetButtonWidth(AValue: integer);