|
|
|
|
|
- Overview
- Management of public holidays
- Managing multi-selection
- Retrieve the multi-selection
- Managing the selection of a time period
- WLanguage functions
- Functions for managing bank holidays
- Calendar control functions
- Properties specific to Calendar controls
Programming Calendar controls
WINDEV, WEBDEV and WINDEV Mobile allow you to manipulate a Calendar control programmatically. To do so, use the variable of Calendar control in the code. The variable of the Calendar control corresponds to the selected date (if the control is multi-selection or with period selection, the variable corresponds to the first selected date). This date uses the format specified in the "Stored format: " control found in the "General" tab of the control description. This variable is a string. Calendar controls can be manipulated programmatically: The Calendar control is associated with several WLanguage processes. Remarks: - You can also manipulate a day of a Calendar control programmatically. For more details, see Managing the calendar days.
- WINDEV, WEBDEV and WINDEV Mobile automatically manage the change of month or the change of year performed by the user.
Management of public holidays Public holidays can be set programmatically. Several WLanguage functions (starting with BankHolidayXXX) are available. BankHolidayAdd is used to define the bank holidays displayed in a Calendar control. This function allows you to define the list of public holidays to be used. This function allows you to customize the public holidays according to the country and local regulations. This function must be used at the beginning of the application because it has a global effect on the application. Example:
BankHolidayDeleteAll()
BankHolidayAdd("0101")
BankHolidayAdd(bhEasterMonday)
BankHolidayAdd("0501")
BankHolidayAdd("0508")
BankHolidayAdd(bhAscensionDay)
BankHolidayAdd(bhWhitMonday)
BankHolidayAdd("0714")
BankHolidayAdd("0815")
BankHolidayAdd("1101")
BankHolidayAdd("1111")
BankHolidayAdd("1225")
BankHolidayAdd("1226" + CR + bhGoodFriday)
Functions for managing bank holidays The following functions are used to manage bank holidays:
Calendar control functions The following functions are used to manage the Calendar control:
Properties specific to Calendar controls The following properties are specific to programmed Calendar control. | | EndDate | Allows you to get and change the end date of a time period selected in a Calendar control. | Image | Allows you to find out and modify the background image of Calendar control. | MaxValue | Allows you to find out and modify the upper bound of Calendar control. | MemoryFormat | Allows you to find out and modify the format of the value returned by the Calendar control. | MinValue | Allows you to find out and modify the lower bound of Calendar control. | Multi-selection | Used to find out and modify the selection mode of a Calendar control | StartDate | Allows you to get and change the start date of a time period selected in a Calendar control. |
For a complete list of WLanguage properties that can be used with Calendar controls, see Calendar control properties.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|