Common Properties

TITLE

Date entry controls do not use the TITLE property.

VALUE

The date entry control stores a value that is a complete date and time. The format of this value as seen by your program varies depending on the VALUE-FORMAT property. The initial value for the control is the date and time the control is created.

Although the value of the control is alphanumeric, usual practice is to treat the value as if it were numeric, setting and retrieving its value using numeric variables. The run-time system and the control perform any necessary conversions.

The control does not usually allow invalid date or time values. This can be circumvented with the SHOW-NONE style.

SIZE

Date entry controls determine height using a combination of font height plus overhead of roughly 50 percent for the box and 3-D effect. The default LINES setting is 1.

Date entry controls calculate width by multiplying the SIZE setting by the standard width of the font and then adding overhead for the box, 3-D effect, and calendar drop-down button. In most cases, you will get good results by setting the SIZE roughly equal to the number of characters in the formatted display. The default SIZE value is 8.

Note that a date entry control automatically makes small adjustments to its specified size and position in order to better align with other ACUCOBOL-GT controls that use the 3-D format

COLOR

Date entry controls ignore any specified color settings. The actual colors displayed are chosen by end-users in the Windows Control Panel. This may result in an unusual appearance if a date entry control is added to a screen that uses custom colors. The limitation is inherent to the underlying control.

EVENT-LIST, EXCLUDE-EVENT-LIST

EVENT-LIST is an exclusive list of events that are either sent to or withheld (blocked) from the program depending on the value of EXCLUDE-EVENT-LIST. See Common Screen Options for more information.

STYLES

CENTURY-DATE Uses nearly the same format as the SHORT-DATE style, but the year portion always appears as four digits, even if the user has specified a two-digit format in the Windows Control Panel. Users must have Internet Explorer 5.0 or later installed to use this style successfully.
LONG-DATE Causes the date entry control to display a localized long date format. The exact format of the long date depends on settings specified by the user in the Windows Control Panel. In the United States, a common long date format is Monday, February 16, 2004.
NO-F4 By default, the date entry control lets users open the calendar using the F4 key. This style prevents the control from using this shortcut, reserving this key for your program's use. Note that the Alt+Down Arrow key combination also opens the calendar.
NO-UPDOWN By default, the date entry control lets users scroll through the valid values for each portion of the date or time using the up and down arrow keys. This style disables these functions, reserving the arrow keys for your program's use. Note that users can still scroll through values in the date entry control using the + and - keys on the numeric keypad.
NOTIFY-CHANGE Causes the date entry control to generate an NTF-CHANGED event each time the user changes the displayed date or time. If this style is not specified, the program is informed of a new value in the control only when the user leaves the field or performs a terminating event (like pressing a function key).
RIGHT-ALIGN Causes the drop-down calendar to be roughly aligned with the right edge of the date entry control. By default, the calendar is aligned with the left edge of the control.
SHORT-DATE Causes the date entry control to display a localized short date format. The exact format of the short date depends on settings specified by the user in the Windows Control Panel. In the United States, a common short date format is 02/16/2004.

If no other format is specified, the control will default to the SHORT-DATE format.

SHOW-NONE Adds a check box to the date entry control. When the check box is checked, the control contains a valid date and/or time. When the check box is not checked, the control behaves as if it had no value, returning all zeroes instead of a date, or all nines instead of a time.

If you have created a date entry control with the SHOW-NONE style, you can programatically cause the check-box to be unchecked and the value to appear grayed out by setting a date of zero or a time of all nines. Likewise, by setting a valid date or time, you can cause the check-box to appear checked and the value to appear normally.

To create a date entry control that uses the SHOW-NONE style and starts with no date or no time, for example, you could use one of the following statements:

DISPLAY DATE-ENTRY, SHOW-NONE, VALUE ZERO
DISPLAY DATE-ENTRY, SHOW-NONE, VALUE 999999

Note that the 999999 in the second example assumes the default HHMMSS time format.

SPINNER By default, a date entry control displays the date with a button used to open a drop-down calendar. When you specify this style, that button is replaced with small up and down arrows that can be used to modify each portion of the date without referring to the calendar.

The spinner arrows appear by default when the date entry control displays a time format.

TIME Causes the control to show a localized time format. The exact format depends on settings specified by the user in the Windows Control Panel. 10:35 AM is a typical format.

If this style is set when the control is created, the VALUE-FORMAT property is given the default value DAVF-HHMMSS. See the description of the VALUE-FORMAT special property for more information.