LCL, TDBDateDeit: Display date as empty string when its value in database is NULL. Patch by Don Siders, issue #40661.

This commit is contained in:
Maxim Ganetsky 2023-12-29 03:33:50 +03:00
parent aae0c2019e
commit 72fd05acc7

View File

@ -12,7 +12,7 @@
procedure TDBDateEdit.DataChange(Sender: TObject);
begin
if FDataLink.Field <> nil then
if (FDataLink.Field <> nil) and (not FDataLink.Field.IsNull) then
Self.Date := FDataLink.Field.AsDateTime
else
Text := '';