This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
DatePicker SET DEFAULT DAYS OFF
|
DatePicker SET DEFAULT DAYS OFF ( dayType ; ptrDaysOffArray ) | ||||||||
Parameter | Type | Description | ||||||
dayType | Longint |
![]() |
Types of days off | |||||
ptrDaysOffArray | Pointer |
![]() |
Pointer to date or Boolean array of days off | |||||
The DatePicker SET DEFAULT DAYS OFF command is used to set the days off that will appear in all the calendars of the DatePicker component. These days are displayed in bold and italic and remain selectable for the user.
Note that this setting is only taken into account for calendars that are created subsequently and does not apply to any existing calendars. If you want to apply it to the existing calendars, you will need to use the DatePicker APPLY DEFAULT VALUES component method.
The command can be used to set recurrent weekly or yearly days off as well as occasional holidays. You specify the type of days off set by the method 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 recurrent holidays (example valid for the USA):
ARRAY DATE($arrdRepeatedDays;0)
//The year is ignored; we use 2000 by default
APPEND TO ARRAY($arrdRepeatedDays;!01/01/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!02/02/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!02/14/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!03/17/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!04/01/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!10/31/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!11/11/2000!)
APPEND TO ARRAY($arrdRepeatedDays;!12/25/2000!)
DatePicker SET DEFAULT DAYS OFF(1;->$arrdRepeatedDays)
Product: 4D
Theme: DatePicker
4D Widgets ( 4D v19)