Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > AUI > AUI_CONTROL > Control Types

Date Picker Control (INFLD)

Scroll Prev Top Next More

A date picker is a special kind of edit control designed only for the input of dates. It is created automatically by INFLD when called on to edit a date field (type D) in GUI mode (|G). (It is not activated in the "lesser GUI mode", which you get with type |g.) In the first example below, the field is being edited, but unlike with a normal field, the control selects one sub-field (month, day, or year) to edit at a time. You can either type digits, or use the Up/Down-Arrows, or use the Plus / Minus keys on the numeric pad, to increment/decrement the value. Use the Right-Arrow to move to the next sub-field.

ashref_img123

If the date is optional (XMIN=0), a checkbox will appear. If unchecked, the date is grayed out and unavailable. To change it, first check the checkbox:

ashref_img124

ashref_img125

To display the calendar, click on the Down-Arrow button, or hit Alt+Down-arrow:

ashref_img126

The format used by the date picker for editing and display is based on the localization settings of the client PC. But the format returned to the application is based on the INFLD type codes and xmax value. With xmax=6, only 2 digits of the year are turned. With xmax=8, the entire CCYY is returned. TYPE D uses American format (MM/DD/{CC}YY), TYPE U forces European (DD/MM/{CC}YY) format, and TYPE u selects the format from the language definition file (e.g. englsh.ldf[1,6]). TYPE > forces the date to be returned in CCYYMMDD format (most convenient for sorting, independent of country format).

See Month Calendar Controlfor information on using the calendar control independently of an INFLD date field.

Comment

If you would like to implement your own date picker (i.e. your own calendar display associated with the INFLD date field), use the "lesser GUI mode" (|g) and set the setdef parameter to "...", which will give you an INFLD date control which returns to you with EXITCODE=29 if the user clicks on the Down-arrow button. You can then pop up whatever kind of display you like to help the user select a date.

Or, to use the edit part of the date picker control, but replace the drop-down calendar part, use |G with ||v (and set setdef = "..." as above).