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.
Get
| C# | string Text = object.DefaultText; |
| VB.NET | Text = object.DefaultText As String |
| C++ | _bstr_t Text = object->DefaultText; _bstr_t Text = object->GetDefaultText(); |
| C | HRESULT object->get_DefaultText(BSTR* Text); |
Put
| C# | string object.DefaultText = Text; |
| VB.NET | object.DefaultText = Text As String |
| C++ | _bstr_t object->DefaultText = Text; void object->PutDefaultText(_bstr_t Text); |
| C | HRESULT object->put_DefaultText(BSTR Text); |
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.
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