Fix CanDefocus with proper validations

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3607 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2014-09-27 15:36:35 +00:00
parent e9ae26952f
commit 408d51b845

View File

@ -532,7 +532,7 @@ begin
exit;
if (Length(CellEditor.Text) = 0) then
exit;
Result := IsValidDateTimeString(NormalizeDateTime(CellEditor.Caption, theValue));
Result := IsValidDateTimeString(NormalizeDateTime(CellEditor.Text, theValue));
if not Result then
begin
ShowMessage(Format(SInvalidDateTime, [CellEditor.Text]));
@ -726,7 +726,7 @@ begin
exit;
if (Length(CellEditor.Text) = 0) then
exit;
Result := IsValidDateTimeString(NormalizeTime(CellEditor.Caption, theValue));
Result := IsValidTimeString(NormalizeTime(CellEditor.Caption, theValue));
if not Result then
begin
ShowMessage(Format(SInvalidTime, [CellEditor.Text]));
@ -959,7 +959,7 @@ begin
exit;
if (Length(CellEditor.Text) = 0) then
exit;
Result := IsValidDateTimeString(NormalizeDateTime(CellEditor.Caption, theValue));
Result := IsValidDateString(NormalizeDate(CellEditor.Text, theValue));
if not Result then
begin
ShowMessage(Format(SInvalidDate, [CellEditor.Text]));