Form items / Form item types |
Defines a line-edit with a clock widget to pick a time.
The TIMEEDIT form item defines a field that allows the user to edit 24H time values, or time duration (intervals), with a specific clock widget for time input.
To store TIMEEDIT field values, consider using the appropriate DATETIME HOUR TO MINUTE or DATETIME HOUR TO SECOND data type according to the target front-end.
On some front ends, TIMEEDIT fields can also be used to handle INTERVAL values of the class HOUR TO {MINUTE|SECOND}, in order to input a time duration. Note however that in most cases the time interval pickers are limited to 24H hours and allow only positive values. As result, not all values allowed in an INTERVAL HOUR TO MINUTE variable (such as -86 hours 23 minutes) can be displayed by such widgets.
No specific attribute is needed to define the rendering and behavior of a TIMEEDIT field. Common data validation attributes such NOT NULL, REQUIRED, DEFAULT are allowed.
The native widget used for TIMEEDIT fields usually allows only exact time value input, and therefore cannot be used with a CONSTRUCT instruction, where it must be possible to enter search filters like ">=11:00".
Some front-ends support different presentation and behavior options, which can be controlled by a STYLE attribute. For more details, see Common style attributes.
To inform the dialog when a date is picked from the clock widget, define an ON CHANGE block for the TIMEEDIT field. The program can then react immediately to user changes in the field:
-- Form file (grid layout) TIMEEDIT de1 = order.ord_shiptime, NOT NULL; -- Program file: ON CHANGE ord_shiptime -- An new time value was picked from the clock widget
For more details, see Reacting to field value changes.
The input length in a TIMEEDIT fields is defined by the (DATETIME) program variable. In a grid-based layout, define an item tag with enough positions, to be able to display all time value digits (5 positions for HH:MM, 7 positions for HH:MM:SS). For more details, see Field input length.