HeaderPane
Main
Hide
Share Link
Print

DefaultText Property, SftDate Object

Defines a text such as =Today that sets the value relative to the current date when it is set and when the control is loaded.

Syntax

Get

C#string Text = object.DefaultText;
VB.NETText = object.DefaultText As String
C++_bstr_t Text = object->DefaultText;
_bstr_t Text = object->GetDefaultText();
CHRESULT object->get_DefaultText(BSTR* Text);

Put

C#string object.DefaultText = Text;
VB.NETobject.DefaultText = Text As String
C++_bstr_t object->DefaultText = Text;
void object->PutDefaultText(_bstr_t Text);
CHRESULT object->put_DefaultText(BSTR Text);

object

A SftDate object.

Text

Defines a text such as =Today that sets the value relative to the current date when it is set and when the control is loaded.

Comments

The DefaultText property defines a text that sets the value of a date field control relative to the current date: "=Today", "=Yesterday", "=Tomorrow" (00:00:00 of the day) or "=Now" (the current date and time). Case doesn't matter. The default is an empty string. p The text is applied when it is set and each time the control is loaded, so a form whose field has the default text "=Today" shows the current date whenever it opens. A value saved with the form (a value set at design time) takes precedence. A date outside the range defined using MinDate and MaxDate is moved into it. A text other than those listed is kept but doesn't change the value. In range selection mode, both dates are set. p The user can type the same texts in free-form editing (EditStyle). They always use the computer's date, not the date defined using Calendar.TodayDate.

See Also SftDate Object | Object Hierarchy | Values


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.