Re: clear Delphi Datetimepicker while loading
Posted by webmaster Guido on February 07, 2005
In Reply to: Want to clear Datetimepicker while loading posted by Venkat on January
Delphi's DateTimePicker has Date and Time properties; by default, these are set to the system's date and time at the moment that you add the component to a form.
You can't clear these properties to *nothing* in the Object Inspector, they always will contain a value:
However, you can preset the Date and/or Time of the DateTimePicker at runtime, for example when the form is created:
procedure TForm1.FormCreate(Sender: TObject); begin // set Date property to tomorrow DateTimePicker1.Date := Date + 1; // set Time property to 12 o'clock DateTimePicker1.Time := 0.5; end;