From e4f357ac35978932a8f4160d92201b300be33176 Mon Sep 17 00:00:00 2001 From: jujibo Date: Tue, 27 Sep 2011 08:28:41 +0000 Subject: [PATCH] Fix: wrong checks editing ftDateTime git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2021 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/jujiboutils/jujibo-utils/src/jdbgridutils.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/jujiboutils/jujibo-utils/src/jdbgridutils.pas b/components/jujiboutils/jujibo-utils/src/jdbgridutils.pas index 3914f8f2f..c695c37ad 100644 --- a/components/jujiboutils/jujibo-utils/src/jdbgridutils.pas +++ b/components/jujiboutils/jujibo-utils/src/jdbgridutils.pas @@ -174,7 +174,7 @@ end; procedure TJDbGridDateTimeCtrl.myEditOnEditingDone(Sender: TObject); begin - CellEditor.Caption := NormalizeDate(CellEditor.Caption, theValue); + CellEditor.Caption := NormalizeDateTime(CellEditor.Caption, theValue); if Length(CellEditor.Caption) = 0 then begin Field.DataSet.Edit; @@ -183,11 +183,11 @@ begin updated := True; end else - if IsValidDateString(CellEditor.Caption) then + if IsValidDateTimeString(CellEditor.Caption) then begin if (not updated) then begin - theValue := StrToDate(CellEditor.Caption); + theValue := StrToDateTime(CellEditor.Caption); Field.DataSet.Edit; Field.AsDateTime := theValue; end;