import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime'; import { PickerTypeKeys } from './picker-factory'; /** * A datepicker is a ui component to select dates and times. It behaves like a native `input` but uses the [flatpickr](https://github.com/flatpickr/flatpickr) library for a better ui experience. * * #### Types * This datepicker can be used as a picker for different types: * - date * - time * - datetime * - month * * @slot icon-leading - Leading `ino-icon` of the underyling ino-input (only for inline pickers) * @slot icon-trailing - Trailing `ino-icon` of the underyling ino-input (only for inline pickers) */ export declare class Datepicker implements ComponentInterface { el: HTMLInoDatepickerElement; private flatpickr; private inoInputEl?; private validator; /** * Autofocuses this element. */ autoFocus?: boolean; /** * Optional id of an element to append the datepicker to. * Default is: * * the host element for inline pickers * * body for collapsable pickers */ appendTo?: string; appendToChanged(appendTo: string): void; /** * Disables this element. */ disabled?: boolean; /** * The input name of this element. */ name?: string; /** * The placeholder of the input element. */ placeholder?: string; /** * Marks this element as required. */ required?: boolean; /** * If true, an *optional* message is displayed if not required, * otherwise a * marker is displayed if required */ showLabelHint?: boolean; /** * The currently selected date shown in the input field **unmanaged**. The given value * will not be formatted as date. */ value?: string; valueChanged(value?: string): void; /** * The minimum date that a user can start picking from (inclusive). */ min?: string; minChanged(min: string): void; /** * The maximum date that a user can pick to (inclusive). */ max?: string; maxChanged(max: string): void; /** * Styles the datepicker as outlined element. */ outline?: boolean; /** * Defines the label for this element. */ label?: string; /** * The helper text. */ helper?: string; /** * Displays the helper permanently. */ helperPersistent?: boolean; /** * Styles the helper text as a validation message. */ helperValidation?: boolean; /** * Displays the datepicker inlined. */ inline?: boolean; /** * If true, enables the user to choose two dates as an interval. * Only works with `type="date"` */ range?: boolean; rangeChanged(val: boolean): void; disabledOrInlineChanged(newValue: boolean): void; /** * Attach calendar overlay to body (true) or * Position the calendar inside the wrapper and inside the ino-datepicker (false) */ attachToBody: boolean; attachToBodyChanged(attachToBody: boolean): void; /** * A string to change the date format. * Possible values are listed [here](https://flatpickr.js.org/formatting/). * The default value is `d-m-Y` which accepts values like `01-01-2019`. */ dateFormat?: string; dateFormatChanged(dateFormat: string): void; /** * A string/array containing the initial date of the datepicker overlay. If you're using `inoRange = true` provide an array. * If a `value` is given, this will be ignored. */ defaultDate?: string | string[]; defaultDateChanged(defaultDate: string): void; /** * A number containing the initial hour in the date-time picker overlay. * If a `value` is given, this will be ignored. */ defaultHour: number; defaultHourChanged(value: string): void; /** * A number containing the initial minute in the date-time picker overlay. * If a `value` is given, this will be ignored. */ defaultMinute?: number; defaultMinuteChanged(value: string): void; /** * If true, displays time picker in 12 hour mode with AM/PM selection. */ twelveHourTime?: boolean; twelveHourTimeChanged(value: boolean): void; /** * Selects the correct picker corresponding to the given type. */ type?: PickerTypeKeys; typeChanged(): void; /** * Adjusts the step for the minute input (incl. scrolling) * Default is 5 */ minuteStep: number; minuteStepChanged(value: number): void; /** * Adjusts the step for the hour input (incl. scrolling) * Default is 1 */ hourStep: number; isValid: boolean; hourStepChanged(value: number): void; inoInputClickedHandler(e: any): void; iconClickedHandler(): void; private focusInputField; /** * Displays the datepicker as invalid if set to true. * If the property is not set or set to false, * the validation is handled by the default validation. */ error?: boolean; errorHandler(value?: boolean): void; /** * Emits when the value of the datepicker changes. * The value can be found in `event.detail` */ valueChange: EventEmitter; /** * Redraws the datepicker. */ redraw(): Promise; /** * Sets focus on the native `input`. * Use this method instead of the global `input.focus()`. */ setFocus(): Promise; /** * Sets blur on the native `input`. * Use this method instead of the global `input.blur()`. */ setBlur(): Promise; connectedCallback(): void; componentWillLoad(): void; componentDidLoad(): void; disconnectedCallback(): void; private toggleFlatpickr; private validate; private maybeCreate; private maybeDispose; render(): any; }