Hello, Grandehombre, I am very sorry that I haven't answered to this post before.
If the user unchecks a checked checkbox, the displayed date shows as NULL (correctly).
No, it does not show as NULL, it has nothing to do with checkbox! The behaviour you are describing is not what I have here.
And it is not the intended behaviour, the state of the checkbox is not connected to value in database. The purpose of the checkbox
(as described here) is to allow or forbid direct user interaction with date/time.
However, if you want to use the checbox for this purpose you can do it by programming OnCheckBoxChange event, something like this:
procedure TForm2.DBZVDateTimePicker3CheckBoxChange(Sender: TObject);
begin
if (not DBZVDateTimePicker3.Checked) and (not DBZVDateTimePicker3.Field.IsNull) then begin
DBZVDateTimePicker3.DataSource.DataSet.Edit;
DBZVDateTimePicker3.Field.Value := Null;
end;
end;
This should get the behaviour you want. However, I am not going to bind the check box to the value of underlying db field, it is certainly not what check box is intended to do.