@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
42 lines (40 loc) • 3.09 kB
TypeScript
import type Input from "./Input.js";
import type { TimeResolution } from "../../../portal/jsonTypes.js";
export interface TimePickerInputProperties extends Partial<Pick<TimePickerInput, "max" | "min" | "timeResolution">> {}
/**
* The `TimePickerInput` class defines the desired user interface for editing `time-only` field [Field.type](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) input. These inputs are used in [field elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) that are set within a [feature layer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm.formTemplate](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate` which will be picked up and displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) widget.
*
* @since 4.28
* @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
* @see [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/)
* @see [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/)
* @see [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
* @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
* });
*/
export default class TimePickerInput extends Input {
constructor(properties?: TimePickerInputProperties);
/** The maximum time to allow. The string represents an [ISO-8601 time](https://www.iso.org/iso-8601-date-and-time-format.html) in either `hh:mm:ss` or `hh:mm:ss.sss` format. For example, a string of `"20:10:15"` represents the time of 8:10 PM (20th hour), and 15 seconds. */
accessor max: string | null | undefined;
/** The minimum time to allow. The string represents an [ISO-8601 time](https://www.iso.org/iso-8601-date-and-time-format.html) in either `hh:mm:ss` or `hh:mm:ss.sss` format. For example, a string of `14:15:30` represents the time of 2:15 PM (14th hour), and 30 seconds. */
accessor min: string | null | undefined;
/**
* The level of detail used to represent time.
*
* @default "minutes"
*/
accessor timeResolution: TimeResolution;
/** The type of form element input. */
get type(): "time-picker";
/**
* Creates a deep clone of the `TimePickerInput` class.
*
* @returns A deep clone of the `TimePickerInput` instance.
*/
clone(): TimePickerInput;
}