4D v16DatePicker SET DAYS OFF |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16
DatePicker SET DAYS OFF
|
DatePicker SET DAYS OFF ( objectName {; dayType ; ptrDaysOffArray} ) | ||||||||
Parameter | Type | Description | ||||||
objectName | Text |
![]() |
Name of subform object | |||||
dayType | Longint |
![]() |
Types of days off | |||||
ptrDaysOffArray | Pointer |
![]() |
Pointer to date or Boolean array of days off | |||||
The DatePicker SET DAYS OFF command is used to set the days off to appear in the DatePicker calendar. These days are displayed in bold and italic and remain selectable for the user.
The objectName parameter specifies the instance of the subform to which the command must be applied. In this parameter, you must pass the name of a subform object displayed in the current form.
This command can be used to set either recurrent weekly or yearly days off as well as occasional holidays. You specify the type of days off set via the dayType parameter:
You set the holidays by creating a array and by passing a pointer to this array as the ptrDaysOffArray parameter. The type of array depends on the value passed in dayType:
Designation of Friday as the weekly day off (instead of Saturday and Sunday by default):
ARRAY BOOLEAN($arrbDaysOff;7)
//By default, all the elements of a Boolean array are False; thus it is not necessary to add initialization code
$arrbDaysOff{Friday}:=True
DatePicker SET DAYS OFF("mycalendar";0;->$arrbDaysOff)
Designation of occasional holidays:
ARRAY DATE($arrdUniqueDays;0)
//The year is taken into account
APPEND TO ARRAY($arrdUniqueDays;!02/15/2008!)
APPEND TO ARRAY($arrdUniqueDays;!02/12/2009!)
APPEND TO ARRAY($arrdUniqueDays;!02/17/2010!)
DatePicker SET DAYS OFF(1;->$arrdUniqueDays)
DatePicker SET DEFAULT DAYS OFF
DatePicker SET WEEK FIRST DAY
Product: 4D
Theme: DatePicker
4D Widgets ( 4D v16)