You've already forked lazarus-ccr
RXDBGrid - fix clear cell with date format in RxDBGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2810 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1136,6 +1136,8 @@ end;
|
|||||||
{ TRxDBGridDateEditor }
|
{ TRxDBGridDateEditor }
|
||||||
|
|
||||||
procedure TRxDBGridDateEditor.Change;
|
procedure TRxDBGridDateEditor.Change;
|
||||||
|
var
|
||||||
|
D:TDateTime;
|
||||||
begin
|
begin
|
||||||
inherited Change;
|
inherited Change;
|
||||||
if Assigned(FGrid) and FGrid.DatalinkActive and not FGrid.EditorIsReadOnly then
|
if Assigned(FGrid) and FGrid.DatalinkActive and not FGrid.EditorIsReadOnly then
|
||||||
@ -1148,7 +1150,12 @@ begin
|
|||||||
FGrid.SelectedField.Clear;
|
FGrid.SelectedField.Clear;
|
||||||
|
|
||||||
if FGrid <> nil then
|
if FGrid <> nil then
|
||||||
FGrid.SetEditText(FCol, FRow, Text);
|
begin
|
||||||
|
if TryStrToDate(Text, D) then
|
||||||
|
FGrid.SetEditText(FCol, FRow, Text)
|
||||||
|
else
|
||||||
|
FGrid.SetEditText(FCol, FRow, '');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user