Skip to content
import TimePickerInput from "@arcgis/core/form/elements/inputs/TimePickerInput.js";
Inheritance:
TimePickerInputInputAccessor
Since
ArcGIS Maps SDK for JavaScript 4.28

The TimePickerInput class defines the desired user interface for editing time-only field Field.type input. These inputs are used in field elements that are set within a feature layer or FeatureForm.formTemplate formTemplate which will be picked up and displayed within the Editor widget.

See also
Example
const timePickerInput = new TimePickerInput({
min: "14:15:00" , // the minimum time input allowed, this equates to 2:15 PM (14th hour), 30 seconds, and 132 milliseconds.
max: "20:10:15", // the maximum time input allowed, this equates to 8:10 PM (20th hour), 15 seconds, and 123 milliseconds.
timeResolution: "minutes" // the level of precision needed for the time input
});

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
max
min
type
readonly
"time-picker"

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

max

Property
Type
string | null | undefined

The maximum time to allow. The string represents an ISO-8601 time in either hh:mm:ss or hh:mm:ss.sss format. For example, a string of "20:10:15" represents the time of 8

PM (20th hour), and 15 seconds.

min

Property
Type
string | null | undefined

The minimum time to allow. The string represents an ISO-8601 time in either hh:mm:ss or hh:mm:ss.sss format. For example, a string of 14:15:30 represents the time of 2

PM (14th hour), and 30 seconds.

timeResolution

Property
Type
TimeResolution

The level of detail used to represent time.

Default value
"minutes"

type

readonly Property
Type
"time-picker"

The type of form element input.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone(): TimePickerInput
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

clone

Method
Signature
clone (): TimePickerInput

Creates a deep clone of the TimePickerInput class.

Returns
TimePickerInput

A deep clone of the TimePickerInput instance.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.