for example
MyDateEdit.MinDate := DateOf(Now);
I'm using Delphi XE7 Update 1 and the help file seems to not mention any property or method to do this
for example
MyDateEdit.MinDate := DateOf(Now);
I'm using Delphi XE7 Update 1 and the help file seems to not mention any property or method to do this
There is no property that I'm aware of, but you can enforce this using the OnChange event of your MyDateEdit control.
procedure TForm1.MyDateEditChange(Sender: TObject);
begin
with Sender as TDateEdit do
begin
if Date < Now then
Date := Now;
end;
end;
To clarify based off @SilverWarior 's comment below: This will not allow any date prior to your minimum date to exist in your control at any time. If you want a user to enter a date by keyboard entry (and during their entry the date may fall below your minimum), it may be best to use the OnExit event instead of the OnChange event.