AMT Help Files

Calendar

Description:

This is a calendar object that contains a date value. At runtime, when you click the calendar icon on the right side of the object, a calendar is displayed from which you can select a date. At design time, you can assign or retrieve a date value for the calendar object in code using the format yyyymmdd.

The initial value of the calendar is the current date. You can set it to blank by assigning 0 (zero) to the object, for example Calendar1 := 0, where Calendar1 is the name of the object. At runtime, nothing is then displayed in the calendar edit box.

AMT Screens

In AMT Screens, a date value can be entered in the calendar edit box without separators in either the ddmmyyyy or mmddyyyy format, depending on the user's Windows regional settings. Using separators is also allowed for those formats, for example dd-mm-yyyy or mm-dd-yyyy.

For formats that start with the year, separators are always required when entering the date.

Allowed separators are spaces (for example 11 07 2017), hyphens (for example 11-07-2017), slashes (for example 11/07/2017), and periods (for example 11.07.2017).

If an invalid date is entered, the calendar value reverts to the last valid value.

To remove a date from the calendar field, clear the calendar edit box of all characters. The calendar value is then set to 0 on transmit.

When the user clicks the calendar button for a calendar with the value 0 (zero), the current date is selected initially while the month is displayed.

Lion Screens

In Lion Screens, the date value can be typed only one date element at a time (for example, dd, mm, or yyyy). You can switch between date elements by using the arrow keys on the keyboard or by clicking a date element with the mouse.

To remove a date from the calendar field, select the calendar edit box and press the Delete key. The calendar value is then set to 0 on transmit.

When the user begins typing in the edit box of a calendar with the value 0 (zero), the current date is displayed initially and can then be edited. When the user clicks the calendar button, the current date is also selected initially while the month is displayed.

Years without century

(Applies to AMT Screens and Lion Screens only.)

If a date with only the last two digits of the year is entered into a calendar object at runtime (for example, 11-12-27), the century depends on the user's Windows date format setting. In Windows 10, this can be found in Windows Settings > Time & Language > Region > Additional date, time, and regional settings > Change date, time, or number formats > Additional settings > Date tab > Calendar.

In addition to the two-digit year settings, the first day of the week of the calendar can also be set here.

Web Client

In the web client, a date value can be entered in the calendar edit box without separators only in the mmddyyyy format. Using separators is also allowed, for example mm-dd-yyyy.

For formats that start with the year, separators are always required when entering the date.

Allowed separators are spaces (for example 07 13 2017), hyphens (for example 07-13-2017), slashes (for example 07/13/2017), and periods (for example 07.13.2017).

If an invalid date is entered, the calendar value reverts to the last valid value.

To remove a date from the calendar field, clear the calendar edit box of all characters. The calendar value is then set to 0 on transmit.

When the user clicks the calendar button for a calendar with the value 0 (zero), the current date is selected initially while the month is displayed.

Toolbar button icon:

Properties:

Events:

Dynamic code properties:

Contents