I am writing column and cell classes for FMX TGrid
that will contain TCalendarEdit
and TTimeEdit
instances in every cell. Everything works
TDateTime
is of type Double
, which means it's a floating point value, and therefore is subject to the usual issues of binary representation when doing comparisons for equality without specifying an acceptable delta (difference)..
Specifically for TDateTime
values, you can use DateUtils.SameDateTime
to compare equality down to less than one millisecond:
FDate_Time.Modified := (FDate_Time.Modified) or
(not SameDateTime(FDate_Time.FieldValue,
FCalendarEdit.Date + FTimeEdit.Time));