TimePicker
<div id="repair_time_start"
data-win-control="HFWinJSCtrl.TimePicker"
data-win-options="{
defaultValue: 'now',
required: true,
label: 'Time start'
}"></div>
FormControl Options
Options of the kendo component are also available. read more
convertToLocalTime
If set to true, the selected time is converted to the local time of the device's time zone.
convertToLocalTime: true
boolean
defaultValue
Use the value "now" to offer the current ('local') time. The format is hh:mm. A custom code function can be used to set defaultValue.
defaultValue: 'now'
string | function
function() => string | Date
disabled
Set "true" whenever the TimePicker should be disabled.
disabled: true
boolean
doNotCopy
Set "true" whenever the field should get deleted if form is copied.
doNotCopy: true
boolean
emptyContent
Write a short word to indicate that the appropriate time can/must be chosen.
emptyContent: 'hh:mm'
string
format
Specifes the used time format. hh:mm using 12-hour clock, tt shows the AM/PM designator and HH:mm using 24-hour clock. For more information visit: https://docs.telerik.com/kendo-ui/framework/globalization/dateformatting.
format: 'hh:mm tt'
string
list
Set this property to "true" if data connected with this control should be a sorting/filtering/grouping option on the listpage, is used in template objects (eg. the listTemplate) or it should show up in admin ui listings.
list: true
boolean
listOptions
Set additional options for controls with list equals true. E.g. set custom label for filter/sort/group dialogs or hide them complettely.
listOptions: {...}
{ dialogText: string, dialogHide: boolean }
max
Set to allow entries up to until this time. Format is HH:mm.
max: '19:00'
string
mobilePicker
Use native time picker on mobile devices. There are settings restrictions e.g. formatting or start interval.
mobilePicker: true
boolean
modernType
Use classic TimePicker view by setting this option to false.
modernType: false
boolean
true
onChanged
Call a pre-defined JS-method to do something when the status of the control changes.
onChanged: HFFormdefinition.Namespace.Method
function
function(value: Date) => void
persistent
The value "user" sets the initial value of the TimePicker to the value of the previous form item of the current user and overwrites any defaultValue.
persistent: 'user'
'user'
tooltip
Write a comment to provide further information about the field. A question mark will then be shown within the label and with a click/tap on it, the information will occur.
tooltip: 'Fill in the time you started.'
string
tooltipTemplate
Write an id of a html container to provide further information about the field. A question mark will then be shown within the label and with a click/tap on it, the content of the container will occur.
tooltipTemplate: 'example_control_tooltip'
string
visiting
Set "true" whenever the form element should be marked as "visited" when the user has clicked or tapped at the form field.
visiting: true
boolean
listOptions Object
dialogText
Set custom label for filter/sort/group dialogs.
dialogText: 'Display Text'
string
copyValueTo
Define FormControls in which the entered value should be copied.
<div id="timepicker_field_copy_source"
data-win-control="HFWinJSCtrl.TimePicker"
data-win-options="{
label: 'TimePicker: source',
copyValueTo: [{
targetId: 'timepicker_field_copy_target_1'
}, {
targetId: 'timepicker_field_copy_target_2',
shadowPostfix: '_HFTime'
}]
}"></div>
interface ICopyValueToObject {
targetId: string;
mode: 'overwrite' | null;
shadowPostfix: string;
callback: (value: string) => string;
}
type CopyValueToType = string | ICopyValueToObject | Array<string | ICopyValueToObject>;
callback
Specify a function to process value before copy.
callback: HFFormDefinition.Namespace.processValue
function
function(value: string) => string
mode
Specify if target field gets overwritten. Default behviour is to only copy to empty fields.
mode: 'overwrite'
string
shadowPostfix
Specify which shadow field is copied.
shadowPostfix: '_HFNumericField'
string
Stored data
{
"id": "repair_time_start",
"value": "2021-08-04T12:30:00.000Z"
}
{
"id": "repair_time_start_HFTime",
"value": "14:30"
}
{
"id": "repair_time_start_HFLocal",
"value": "2021-08-04T14:30:00.000+02:00"
}