new TimePicker(id, properties) → {Object}
Parameters:
| Name |
Type |
Description |
id |
String
|
The id of the component. |
properties |
Object
|
HTMLElement
|
The properties used to initialize the component or the container element. |
- Mixes In:
Returns:
An instance of the component.
-
Type
-
Object
Extends
Classes
- TimePickerEvents
Members
allowedTimes :Array.<String>
Gets or sets a list of allowed clock times (format 'HH:MM'). Separate two date strings with a space to specify allowed range. When allowed times are set, date input fields are rendered in readonly mode.
Type:
Gets or sets the id of the ante meridiem (AM) button from which the settings are cloned.
Type:
autoFocus :Boolean
Gets or sets a value indicating whether focus on an input field is automatically moved to the next field while typing.
Type:
clockDialogId :String|null
Gets or sets the id of the clock dialog from which the settings are cloned.
Type:
cssClassHour :String
Gets or sets the css class of the hour input.
Type:
cssClassMinute :String
Gets or sets the css class of the minute input.
Type:
cssClassNumericBox :String
Gets or sets the css class of the numericbox.
Type:
disabled :Boolean
Gets or sets a value indicating whether the timepicker is disabled.
Type:
disallowTimes :Boolean
Gets or sets a value indicating if the times specified in the times property are disallowed instead of the default allowed.
Type:
Type:
Gets or sets the id of the hidden input from which the settings are cloned.
Type:
hourLeadingZero :Boolean
Gets or sets a value indicating whether a leading zero is added to the hour input box if it is not provided. Default: true.
Type:
hourNumericBoxId :String|null
Gets or sets the id of the hour numeric box from which the settings are cloned.
Type:
hourPlaceholder :String
Gets or sets the placeholder which is visible when the hour input box has no value. Default: HH.
Type:
incrementalValue :Number|null
Gets or sets the incremental value in minutes. Minutes must be divisible by 5.
Type:
is24HourClock :Boolean
Gets or sets a value indicating whether a 12 or 24 hour clock is used.
Type:
maxValue :String|null
Gets or sets the maximum allowed time in format 'HH:MM'. Minutes must be divisible by 5.
Type:
meridiemValue :String
Gets or sets the meridiem value if it’s not set to a 24 hour clock.
Type:
minValue :String|null
Gets or sets the minimum allowed time in format 'HH:MM'. Minutes must be divisible by 5.
Type:
minuteNumericBoxId :String|null
Gets or sets the id of the minute numeric box from which the settings are cloned.
Type:
minutePlaceholder :String
Gets or sets the placeholder which is visible when the minute input box has no value. Default: MM.
Type:
name :String
Gets or sets the hidden input field name which contains the selected time value.
Type:
Gets or sets the id of the picker button from which the settings are cloned.
Type:
Gets or sets the id of the post meridiem (PM) button from which the settings are cloned.
Type:
readOnly :Boolean
Gets or sets a value indicating whether the timepicker is readonly.
Type:
value :String|null
Gets or sets the selected time value in format 'HH:MM'.
Type:
Gets or sets the view mode in which the time picker is rendered.
Type:
(static, readonly) ViewModeOption :number
Type:
Properties:
| Name |
Type |
Description |
INPUT_CLOCK_POPUP |
number
|
|
INPUT_CLOCK_STATIC |
number
|
|
INPUT |
number
|
|
CLOCK |
number
|
|
Methods
clear(fireEventopt)
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
fireEvent |
Boolean
|
<optional>
|
false
|
A value indicating if the onChanged event is fired. |
destroy()
- See:
-
getHour() → {Number}
Gets the hour value from the timepicker.
Returns:
-
Type
-
Number
getMeridiemValue() → {String}
Gets a value indicating if the time is before or after noon.
Returns:
-
Type
-
String
getMinute() → {Number}
Returns:
-
Type
-
Number
getValue() → {String}
Gets the time value in string format.
Returns:
Time value in the format 'hour:minute'.
-
Type
-
String
hideClock()
postRender()
Handles the post render procedure.
render()
reset(fireEventopt)
Resets the inputs to the initial value.
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
fireEvent |
Boolean
|
<optional>
|
false
|
A value indicating if the onChanged event is fired. |
select()
Selects the text of the first input field of the timepicker.
selectHourClock()
selectMinuteClock()
Selects the minute clock.
setMeridiemValue(PM)
Sets a value indicating if the time is before or after noon.
Parameters:
| Name |
Type |
Description |
PM |
String
|
or AM. |
setValue(value, fireEventopt)
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
value |
String
|
|
|
The time value in the format hour:minute. |
fireEvent |
Boolean
|
<optional>
|
false
|
A value indicating if the onChanged event is fired. |
showClock()
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In:
Type Definitions
ChangedEventArgs
TimePicker changed event arguments.
Type:
Properties:
| Name |
Type |
Description |
value |
String
|
The time value in the format 'HH:MM'. |