PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Control in a window or in a page
  • Creating a Calendar control
  • Describing a calendar
  • Translating the calendar elements
  • Translating the "Today"/"Preset period" button
  • Translating the days and the months displayed in the calendar
  • Translating the popup menu of calendar
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview

Control in a window or in a page

The Calendar control is used to permanently display a calendar in a window or in a page. This calendar can display today's date or it can interact with the window or with the page (by displaying the schedule corresponding to the selected day for example).
Versions 15 and later
Java This type of control is now available for the Java applications.
New in version 15
Java This type of control is now available for the Java applications.
Java This type of control is now available for the Java applications.
Versions 18 and later
WINDEVLinux This type of control is now available for the WINDEV applications in Linux.
iPhone/iPad This type of control is now available for the iPhone/iPad applications.
Android This type of control is now available for the Android applications.
Android Use conditions: To use a Calendar control in Android, the "Android Support Library V4" extension is required on the development computer, when generating the Android application. The procedure for installing this extension is available from:
http://developer.android.com/tools/extras/support-library.html#Downloading
New in version 18
WINDEVLinux This type of control is now available for the WINDEV applications in Linux.
iPhone/iPad This type of control is now available for the iPhone/iPad applications.
Android This type of control is now available for the Android applications.
Android Use conditions: To use a Calendar control in Android, the "Android Support Library V4" extension is required on the development computer, when generating the Android application. The procedure for installing this extension is available from:
http://developer.android.com/tools/extras/support-library.html#Downloading
WINDEVLinux This type of control is now available for the WINDEV applications in Linux.
iPhone/iPad This type of control is now available for the iPhone/iPad applications.
Android This type of control is now available for the Android applications.
Android Use conditions: To use a Calendar control in Android, the "Android Support Library V4" extension is required on the development computer, when generating the Android application. The procedure for installing this extension is available from:
http://developer.android.com/tools/extras/support-library.html#Downloading
Versions 21 and later
Universal Windows 10 App This type of control is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of control is now available in Universal Windows 10 App mode.
Universal Windows 10 App This type of control is now available in Universal Windows 10 App mode.

Creating a Calendar control

To create a Calendar control:
  1. In the window or page editor, click . You also have the ability to select: On the "Creation" pane, in the "Graphic controls" group:
    • WINDEVWINDEV Mobile "Insert .. Control .. Calendar control". WINDEVWEBDEV - Server code expand "Time" and select "Calendar".
    • WEBDEV - Server code "Insert .. Control .. Calendar". WINDEV Mobile click "Calendar".
  2. Click the position where the control will be created in the window or page. The control appears in creation mode.
To display the control characteristics, select "Description" from the popup menu of control.
Describing a calendar
The Calendar control can be customized in the editor via the description window.
We will now present some features of the Calendar control. You can:
  • define a period of dates managed by the calendar ("Lower bound" and "Upper bound" in the "General" tab of the description window).
  • define a background image:
    • WINDEV "General" tab of the description window.
    • WEBDEV - Server code "Style" tab of the description window, "Background image" element. WEBDEV - Server code "Border, Bckgrd" tab of the description window.
  • define the characteristics of the calendar ("Details" tab of the description window):
    • first day of week,
    • display format of the month,
    • multi-selection calendar (not available in WEBDEV, PHP, iPhone, iPad),
    • presence of a "Today" button.
  • define the style of all the elements displayed in the calendar ("Style" tab). To define the style of an element, all you have to do is click its caption ("Sunday" for example).
  • Versions 16 and later
    modify the image of the "Next" and "Previous" buttons ("Style" tab, "Next/Previous buttons" element).
    New in version 16
    modify the image of the "Next" and "Previous" buttons ("Style" tab, "Next/Previous buttons" element).
    modify the image of the "Next" and "Previous" buttons ("Style" tab, "Next/Previous buttons" element).
Translating the calendar elements

Translating the "Today"/"Preset period" button

The translation of the "Today"/"Preset period" button is performed in the description window of the calendar ("Details" tab).

Translating the days and the months displayed in the calendar

To translate the days and the months displayed in the Calendar control, you must configure the language options of the project.
  1. Display the project description ("Project .. Project description").Display the project description: on the "Project" pane, in the "Project" group, click "Description".
  2. In the "Languages" tab, select the requested language.
  3. In the linguistic options of the selected language, select "Date" then "Use the following parameters".
  4. Click the "Days and Months" button and enter the translations if necessary. Validate.
  5. Validate the project description.
WINDEV

Translating the popup menu of calendar

When a calendar is used to select a period, a popup menu is displayed. The popup menu of the calendar is supplied in English and in French.
To translate the popup menu of the calendar into another language, the IW_WINDEVAafMenu_Date window must be included in your project.
To include the popup menu of the calendar in your project:
  1. Select "File .. Import .. WINDEV elements and their dependencies".On the "Project" pane, in the "Project" group, expand "Import" and select "WINDEV elements and their dependencies".
  2. Select the sub-directory containing the elements to import. The window of the popup menu of the calendar is found in the "\Programs\Data\Preset windows\AAF" sub-directory of the setup directory of WINDEV.
  3. WINDEV lists the elements found in the directory. This directory contains the different elements corresponding to the custom AAF. To customize the calendar, select "IW_WINDEVAafMenu_Date".
  4. Validate. The internal window is included in the project.
Notes:
  • The window must not be renamed.
  • If this window is included in your application, you may not benefit from the improvements made to this window during the different updates. Don't forget to check whether this window has evolved.
  • Caution: To modify this window, the corresponding file must not be read-only. Modify the characteristics of the file in Windows if necessary.
To customize the popup menu of the calendar:
  1. Display the "IW_WinDevAafMenu_Date" window.
  2. In the "GUI" tab, click the button found on the right of "Popup menu". Select "Edit this popup menu".
  3. The popup menu appears in the editor. You have the ability to translate the different options into the requested language.
Linux You cannot select a period in Linux. The popup menu of the calendar is not available.
Related Examples:
The Calendar control Unit examples (WINDEV): The Calendar control
[ + ] Four methods for using the Calendar control:
- Using the Calendar control found in the WINDEV toolbar
- Using CalendarOpen and CalendarPicker as well as CalendarSelect (multi-selection)
- Using ..CalendarButton
- Using BankHolidayAdd
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment