UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

30 lines (28 loc) 2.31 kB
import type Input from "./Input.js"; export interface DatePickerInputProperties extends Partial<Pick<DatePickerInput, "max" | "min">> {} /** * The `DatePickerInput` class defines the desired user interface for editing `date-only` field [Field.type](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) input. This input is used in [field elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate`. This is 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/) * @example * const datePickerInput = new DatePickerInput({ * min: "1982-01-15", // example showing the minimum date input allowed, ie. starts at January 15, 1982 * max: "2030-12-31" // example showing the maximum date input allowed, ie. ends with December 31, 2030 * }); */ export default class DatePickerInput extends Input { constructor(properties?: DatePickerInputProperties); /** The maximum date to allow. The string represents an [ISO-8601 date](https://www.iso.org/iso-8601-date-and-time-format.html) and follows the format pattern of `YYYY-MM-DD`. For example, a string of `"2030-12-31` represents the year 2030, on the 31st day in the month of December. */ accessor max: string | null | undefined; /** The minimum date to allow. The string represents an [ISO-8601 date](https://www.iso.org/iso-8601-date-and-time-format.html) and follows the format pattern of `YYYY-MM-DD`. For example, a string of `"1982-01-15` represents the year 1982, on the 15th day in the month of January. */ accessor min: string | null | undefined; /** The type of form element input. */ get type(): "date-picker"; /** * Creates a deep clone of the `DatePickerInput` class. * * @returns A deep clone of the `DatePickerInput` instance. */ clone(): DatePickerInput; }