SetDateLimits
PowerScript function
Description
Sets the maximum and minimum date limits for the calendar.
Applies to
MonthCalendar control
Syntax
|
1 |
controlname.SetDateLimits ( min, max ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the MonthCalendar control for which you want |
|
min |
A date value to be set as the minimum date that can be |
|
max |
A date value to be set as the maximum date that can be |
Return value
Integer.
Returns 0 when both limits are set successfully and one of the
following negative values otherwise:
-1 — Invalid arguments
-2 — Unknown failure
Usage
Use the SetDateLimits function to set minimum and maximum dates.
SetDateLimits uses the maximum date as the minimum date and vice versa if
you set a maximum date that is earlier than the minimum date.
Examples
This example sets the minimum and maximum dates for a control using
today’s date as the minimum date and a date specified in an EditMask
control as the maximum date:
|
1 2 3 4 5 6 |
integer li_return Date mindate, maxdate mindate = Today() maxdate = Date(em_1.Text) li_return = mc_1.SetDateLimits(mindate, maxdate) |
See also