SetToday
PowerScript function
Description
Sets the value that is used by the calendar as today’s date.
Applies to
DatePicker, MonthCalendar controls
Syntax
|
1 |
controlname.SetToday ( d ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the control for which you want to set the |
|
d |
The date you want to specify as the Today date |
Return value
Integer.
Returns 0 for success and -1 for failure.
Usage
By default, the current system date is set as the Today date. You
can use the SetToday function to specify a different date. If the date is
set to any date other than the current system date, the following
restrictions apply:
-
The control does not automatically update the Today selection
when the time passes midnight for the current day. -
The control does not automatically update its display based on
locale changes.
Examples
This example gets a date from an EditMask control and sets it as the
Today date in a MonthCalendar control:
|
1 2 3 4 5 |
Date currentdate integer li_return currentdate = Date(em_1.Text) li_return = mc_1.SetToday(currentdate) |
See also