I have a TcxGrid and on a DB column on validate i run the following code.
sDate := VarToStr(DisplayValue);
sNew := (DateToStr(Now + 49));
if (sDate < sNew) then begin
MessageDlg('Please enter a Committed Delivery Date that is 7 weeks from today.', mtError, [mbOK], 0);
gvMasterChangeLog.DataController.DataSet.FieldValues['PlannedInstall'] := sInstall; //INSTALL
the problem is that if someone picks a date in the following month (October, greater than September) it still runs the error message.