ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Input and display masks
  • Overview
  • Reminder
  • Default mask
  • The preset masks
  • The custom masks
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview

Reminder

WINDEV, WINDEV Mobile and WEBDEV propose two types of masks:
  • the input masks that define the characters that can be typed in the controls found in a window or in a page. Sometimes, these masks can also be used to modify the case (uppercase/lowercase characters) of the values assigned to the window controls or to the page controls programmatically.
  • the display masks that define the characters that can be:
    • printed in the report controls.
Default mask
By default, when creating a Date control:
  • the "Date defined by project" input mask is selected: the information defined in the date management parameters for the project is automatically taken into account. Reminder: These parameters are defined for each language in the "Languages" tab of the project description:
    1. On the "Project" tab, in the "Project" group, click "Description".
    2. Select the "Languages" tab then the "Date" tab.
    3. The format used corresponds to:
      • the settings of the operating system,
      • the specified parameters (with the defined days and months).
Remarks:
  • In a report, when creating a preset Date control, the wizard allows you to select the display format of the control.
  • A list of preset masks is proposed in the description window of the control. You can:
    • select a preset mask.
    • create a custom mask.
The preset masks
The following masks are proposed (in the order in which they appear in the window editor, page editor or report editor):
  • the date defined by the project. The date defined by the project depends on the date format selected in the parameters of the project language ("Project .. Project description", "Language" tab, language options about the date).
  • 'DD/MM/YYYY' ("01/02/1979" for example)
  • 'DD/MM/YY' ("01/02/79" for example)
  • 'DDD DD' ("Tue 15" for example)
  • 'MM/DD/YYYY' ("02/01/1979" for example)
  • 'MM/DD/YY' ("02/01/79" for example)
  • 'YYYY/MM/DD' ("1979/02/01" for example)
  • 'YY/MM/DD' ("79/02/01" for example)
  • 'DD/MM/YYYY HH:mm:SS' ("01/02/1979 21:35:15" for example)
  • 'MM/DD/YYYY HH:mm:SS' ("02/01/1979 21:35:15" for example)
  • 'DD/MM/YYYY HH:mm:SS:CC' ("01/02/1979 21:35:15:10" for example)
  • 'MM/DD/AAAA HH:mm:SS:CC' ("02/01/1979 21:35:15:10" for example)
  • 'DDDD DD MMMM YYYY' ("Thursday 01 february 1979" for example)
  • 'Dddd DD Mmmm YYYY' ("Tuesday 13 June 2000" for example)
  • 'Dddd DD Mmm YYYY' ("Saturday 01 Dec 2001" for example)
Additional masks are available in WINDEV and WEBDEV:
  • WEBDEV - Server code Date (HTML5)
  • WEBDEV - Server code Date and Time (HTML5)
WEBDEV - Server code Additional masks In WEBDEV, you also have the ability to select HTML 5 input masks. These input masks allow you to use the HTML 5 checks to validate the input.
Please note: These masks are not supported by all browsers, and their operation may differ depending on the browser used.
The following HTML 5 input masks are available:
Selected maskPurposeEffects during the input in the control
Date (HTML5)Enter a date in YYYY-MM-DD format
  • Internet Explorer 9: Unmanaged.
  • Internet Explorer 11: Spin field for automatic date changes.
    When validating the form, if the entered value is incorrect, a message asking you to a enter correct value is displayed.
  • Edge 38: Spin field for automatic date changes.
    When validating the form, if the entered value is incorrect, a tooltip asking you to enter a correct value is displayed. The focus is set on the control.
  • FireFox 5: Unmanaged.
  • Chrome 12: Spin field for automatic date changes.
    When validating the form, if the entered value is incorrect, a tooltip asking you to enter a correct value is displayed. The focus is set on the control.
  • Opera 11.11: Combo with arrow for scrolling calendar.
  • Safari 5 When validating the form, if the value entered is incorrect, the focus is placed on the field.
Date and Time (HTML5)Entering a date and time in YYYY-MM-DDTHH:MM format
  • Internet Explorer 9: Unmanaged.
  • Internet Explorer 11: Unmanaged.
  • Edge 38: Unmanaged.
  • FireFox 5: Unmanaged.
  • Chrome 12: Spin field for automatic date and time setting.
    When validating the form, if the entered value is incorrect, a tooltip asking you to enter a correct value is displayed. The focus is set on the control.
  • Opera 11.11 Combo with an arrow to scroll a calendar for the date section, and a spin to modify the time section.
  • Safari 5 When validating the form, if the value entered is incorrect, the focus is placed on the field.
The custom masks
The following elements can be used to define a custom mask (case sensitive):
  • 'DDDD' (corresponding day of the week, "Thursday" for example. The case used depends on the language options of the project.)
  • DDDD' (corresponding day of the week with the first letter capitalized, e.g. Monday)
  • ddddd' (corresponding day of the week with the first letter forced into lower case, e.g. Monday)
  • 'DDD' (abbreviation of the day of the week, "Thu" for example)
  • DDD' (abbreviation for the day of the week with the first letter capitalized, e.g.: Mon)
  • ddd' (abbreviation for the day of the week with the first letter forced into lower case, e.g.: mon)
  • 'DD' (date in digits, "25" for example)
  • 'MMMM' (month spelled out, "January" for example. The case used depends on the language options of the project.)
  • Mmmm' (month spelled out with the first letter capitalized, e.g. January)
  • mmmm' (month spelled out with the first letter forced into lower case, e.g. January)
  • 'MMM' (abbreviation of the month, "Jan" for example)
  • Mmm' (month abbreviation with the first letter capitalized, e.g. Jan)
  • mmm' (month abbreviation with the first letter forced into lower case, e.g. jan)
  • 'MM' (month in digits, "06" for example)
  • 'YYYY' (year on four digits, "2001" for example)
  • 'YY' (last two digits of the year, "01" for example)
  • 'HH' (hour in digits, "13" for example)
  • 'mm' (minutes in digits, "32" for example)
  • 'SS' (seconds in digits, "46" for example)
These masks can be combined. For example: 'On DD DD DD MMMM YYYY at HH:mm' will give a result of the form "On Thu Feb 01 1979 at 21:35".
WEBDEV - Server code Customized input masks are managed in display mode only: they are not available when the user enters the Edit control field.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/16/2025

Send a report | Local help