TimeField
The time field widget is a text input field with a time picker drop down. It shows left/right arrows to increase or decrease time by the step value.
This field can be used as an editor for the Column. It is used as the default editor for the TimeColumn.
Configuring forward / backward step size
The step configuration controls how the time value changes when using the forward and backward buttons at the start and end of the field. The step value is also used to configure the appropriate picker:
- For steps in minutes (e.g. '5m'), the minute picker will use this step value
- For steps in hours (e.g. '2h'), the hour picker will use this step value
new TimeField({
label : 'Time field',
appendTo : document.body,
step : '5 minutes' // Controls both field buttons and minute picker
});
This widget may be operated using the keyboard. ArrowDown opens the time picker, which itself is keyboard navigable. Shift+ArrowDown activates the step back trigger. Shift+ArrowUp activates the step forwards trigger.
let field = new TimeField({
format: 'HH'
});
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Format for date displayed in field (see Core.helper.DateHelper#function-format-static for formatting options).
Has a corresponding runtime format property.
-
Set to true to not clean up the date part of the passed value. Set to false to reset the date part to January 1st
Has a corresponding runtime keepDate property.
-
Max time value
Has a corresponding runtime max property.
-
Min time value
Has a corresponding runtime min property.
-
Time increment duration value. Defaults to 5 minutes. The value is taken to be a string consisting of the numeric magnitude and the units. The units may be a recognised unit abbreviation of this locale or the full local unit name. For example
"10m"or"5min"or"2 hours"Has a corresponding runtime step property.
-
Set to
falseto hide the forward and backward time step triggers. -
triggers : Object<String, FieldTriggerConfig>
Widgets that trigger functionality upon click. Each trigger icon is a Widget instance which may be hidden, shown and observed and styled just like any other widget.
- expand : FieldTriggerConfig
Expands the picker to select a time
- back : FieldTriggerConfig
Subtracts the step from the current time
- forward : FieldTriggerConfig
Adds the step to the current time
- clear : FieldTriggerConfig
Clears the field value, only available if this field is clearable
Has a corresponding runtime triggers property.
- expand : FieldTriggerConfig
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of TimeField class, or subclass thereof.
Functions
Functions are methods available for calling on the class-
showPicker( )
Show picker