import TimePickerInput from "@arcgis/core/form/elements/inputs/TimePickerInput.js";const TimePickerInput = await $arcgis.import("@arcgis/core/form/elements/inputs/TimePickerInput.js");- 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.
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
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
type readonly | "time-picker" | |
max
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
min
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
timeResolution
- Type
- TimeResolution
The level of detail used to represent time.
- Default value
- "minutes"
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
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
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | 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
- Signature
-
clone (): TimePickerInput
Creates a deep clone of the TimePickerInput class.
- Returns
- TimePickerInput
A deep clone of the
TimePickerInputinstance.
toJSON
- Signature
-
toJSON (): any
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.