@boichikpro/vue3-date-time-picker
Version:
Date & time picker for vue3
854 lines (821 loc) • 36.9 kB
TypeScript
import { AllowedComponentProps } from 'vue';
import { ComponentCustomProperties } from 'vue';
import { ComponentCustomProps } from 'vue';
import { ComponentInternalInstance } from 'vue';
import { ComponentOptionsBase } from 'vue';
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { ComponentPublicInstance } from 'vue';
import { CreateComponentPublicInstanceWithMixins } from 'vue';
import { DebuggerEvent } from 'vue';
import { DefineComponent } from 'vue';
import { GlobalComponents } from 'vue';
import { GlobalDirectives } from 'vue';
import { nextTick } from 'vue';
import { OnCleanup } from '@vue/reactivity';
import { Placement } from '@popperjs/core';
import { Placement as Placement_2 } from '@popperjs/core/lib/enums';
import { PublicProps } from 'vue';
import { Ref } from 'vue';
import { ShallowUnwrapRef } from 'vue';
import { Slot } from 'vue';
import { VNodeProps } from 'vue';
import { WatchOptions } from 'vue';
import { WatchStopHandle } from 'vue';
declare const __VLS_component: DefineComponent<AppDateTimePickerProps, {
popoverVisible: Ref<boolean>;
blur(): void;
focus(): void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
blur: (...args: any[]) => void;
change: (...args: any[]) => void;
focus: (...args: any[]) => void;
"update:model-value": (...args: any[]) => void;
}, string, PublicProps, Readonly<AppDateTimePickerProps> & Readonly<{
onBlur?: ((...args: any[]) => any) | undefined;
onChange?: ((...args: any[]) => any) | undefined;
onFocus?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
}>, {
invalid: boolean;
modelValue: AppDateTimePickerModel;
readonly: boolean;
disabled: boolean;
type: AppDateTimePickerType;
locale: string | Intl.Locale | readonly (string | Intl.Locale)[];
clearable: boolean;
inputReadonly: boolean;
align: AppPickerAlign;
appendToBody: boolean;
stayOpened: boolean;
autoApply: boolean;
dateFormat: string;
timeFormat: string;
combineFormats: boolean;
mode: AppDateTimePickerMode;
firstDayOfWeek: AppDateTimePickerFirstDayOfWeek;
weekdayFormat: AppDateTimePickerWeekdayFormat;
monthCellFormat: AppDateTimePickerMonthFormat;
monthButtonFormat: AppDateTimePickerMonthFormat;
hideOffsetDay: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare const __VLS_component_2: DefineComponent<AppTimePickerProps, {
popoverVisible: Ref<boolean>;
blur(): void;
focus(): void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
blur: (...args: any[]) => void;
change: (...args: any[]) => void;
focus: (...args: any[]) => void;
"update:model-value": (...args: any[]) => void;
}, string, PublicProps, Readonly<AppTimePickerProps> & Readonly<{
onBlur?: ((...args: any[]) => any) | undefined;
onChange?: ((...args: any[]) => any) | undefined;
onFocus?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
}>, {
invalid: boolean;
format: string;
modelValue: AppTimePickerModel;
readonly: boolean;
disabled: boolean;
clearable: boolean;
inputReadonly: boolean;
align: AppPickerAlign;
appendToBody: boolean;
stayOpened: boolean;
autoApply: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare function __VLS_template(): {
slots: {
separator?(_: {}): any;
default?(_: {
ref: string;
value: AppDateTimePickerModel;
popoverVisible: boolean;
input: typeof externalInputValue;
focus: typeof handleFocus;
blur: () => void;
}): any;
};
refs: {
datetimePicker: HTMLDivElement;
popover: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly modelValue: boolean;
readonly placement?: Placement | undefined;
readonly openDelay?: number | undefined;
readonly closeDelay?: number | undefined;
readonly tabindex?: number | undefined;
readonly appendToBody?: boolean | undefined;
readonly disabled?: boolean | undefined;
readonly offset?: number | undefined;
readonly customAppend?: string | undefined;
readonly zIndex?: number | undefined;
readonly clientOnlyPopoverContent?: boolean | undefined;
readonly onClose?: ((...args: any[]) => any) | undefined;
readonly "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
readonly onOpen?: ((...args: any[]) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "close", ...args: any[]) => void) & ((event: "update:modelValue", ...args: any[]) => void) & ((event: "open", ...args: any[]) => void);
$el: any;
$options: ComponentOptionsBase<Readonly<{
modelValue: boolean;
placement?: Placement;
openDelay?: number;
closeDelay?: number;
tabindex?: number;
appendToBody?: boolean;
disabled?: boolean;
offset?: number;
customAppend?: string;
zIndex?: number;
clientOnlyPopoverContent?: boolean;
}> & Readonly<{
onClose?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onOpen?: ((...args: any[]) => any) | undefined;
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
close: (...args: any[]) => void;
"update:modelValue": (...args: any[]) => void;
open: (...args: any[]) => void;
}, string, {
disabled: boolean;
openDelay: number;
closeDelay: number;
appendToBody: boolean;
zIndex: number;
clientOnlyPopoverContent: boolean;
placement: Placement;
tabindex: number;
offset: number;
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{
disabled: boolean;
openDelay: number;
closeDelay: number;
appendToBody: boolean;
zIndex: number;
clientOnlyPopoverContent: boolean;
placement: Placement;
tabindex: number;
offset: number;
}> & Omit<Readonly<{
modelValue: boolean;
placement?: Placement;
openDelay?: number;
closeDelay?: number;
tabindex?: number;
appendToBody?: boolean;
disabled?: boolean;
offset?: number;
customAppend?: string;
zIndex?: number;
clientOnlyPopoverContent?: boolean;
}> & Readonly<{
onClose?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onOpen?: ((...args: any[]) => any) | undefined;
}>, "disabled" | "openDelay" | "closeDelay" | "appendToBody" | "zIndex" | "clientOnlyPopoverContent" | "placement" | "tabindex" | "offset"> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
$slots: {
reference?(_: {}): any;
content?(_: {}): any;
};
}) | null;
input: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly modelValue: AppDateTimePickerModel;
readonly popoverVisible?: boolean | undefined;
readonly onBlur?: ((...args: any[]) => any) | undefined;
readonly onFocus?: ((...args: any[]) => any) | undefined;
readonly onInput?: ((...args: any[]) => any) | undefined;
readonly "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
readonly onClear?: ((...args: any[]) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "blur", ...args: any[]) => void) & ((event: "focus", ...args: any[]) => void) & ((event: "input", ...args: any[]) => void) & ((event: "update:model-value", ...args: any[]) => void) & ((event: "clear", ...args: any[]) => void);
$el: any;
$options: ComponentOptionsBase<Readonly<{
modelValue: AppDateTimePickerModel;
popoverVisible?: boolean;
}> & Readonly<{
onBlur?: ((...args: any[]) => any) | undefined;
onFocus?: ((...args: any[]) => any) | undefined;
onInput?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
onClear?: ((...args: any[]) => any) | undefined;
}>, {
focus: () => void;
blur: () => void;
remove: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
blur: (...args: any[]) => void;
focus: (...args: any[]) => void;
input: (...args: any[]) => void;
"update:model-value": (...args: any[]) => void;
clear: (...args: any[]) => void;
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{}> & Omit<Readonly<{
modelValue: AppDateTimePickerModel;
popoverVisible?: boolean;
}> & Readonly<{
onBlur?: ((...args: any[]) => any) | undefined;
onFocus?: ((...args: any[]) => any) | undefined;
onInput?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
onClear?: ((...args: any[]) => any) | undefined;
}>, "blur" | "focus" | "remove"> & ShallowUnwrapRef< {
focus: () => void;
blur: () => void;
remove: () => void;
}> & {} & ComponentCustomProperties & {} & {
$slots: {
separator?(_: {}): any;
};
}) | null;
content: CreateComponentPublicInstanceWithMixins<Readonly<{
modelValue?: AppDateTimePickerModel;
}> & Readonly<{
"onUpdate:modelValue"?: ((modelValue: AppDateTimePickerModel) => any) | undefined;
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (modelValue: AppDateTimePickerModel) => any;
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<{
modelValue?: AppDateTimePickerModel;
}> & Readonly<{
"onUpdate:modelValue"?: ((modelValue: AppDateTimePickerModel) => any) | undefined;
}>, {}, {}, {}, {}, {}> | null;
};
attrs: Partial<{}>;
};
declare function __VLS_template_2(): {
slots: {
separator?(_: {}): any;
default?(_: {
ref: string;
value: AppTimePickerModel;
popoverVisible: boolean;
input: typeof externalInputValue_2;
focus: typeof handleFocus_2;
blur: () => void;
}): any;
};
refs: {
timePicker: HTMLDivElement;
popover: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly modelValue: boolean;
readonly placement?: Placement_2 | undefined;
readonly openDelay?: number | undefined;
readonly closeDelay?: number | undefined;
readonly tabindex?: number | undefined;
readonly appendToBody?: boolean | undefined;
readonly disabled?: boolean | undefined;
readonly offset?: number | undefined;
readonly customAppend?: string | undefined;
readonly zIndex?: number | undefined;
readonly clientOnlyPopoverContent?: boolean | undefined;
readonly onClose?: ((...args: any[]) => any) | undefined;
readonly "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
readonly onOpen?: ((...args: any[]) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "close", ...args: any[]) => void) & ((event: "update:modelValue", ...args: any[]) => void) & ((event: "open", ...args: any[]) => void);
$el: any;
$options: ComponentOptionsBase<Readonly<{
modelValue: boolean;
placement?: Placement_2;
openDelay?: number;
closeDelay?: number;
tabindex?: number;
appendToBody?: boolean;
disabled?: boolean;
offset?: number;
customAppend?: string;
zIndex?: number;
clientOnlyPopoverContent?: boolean;
}> & Readonly<{
onClose?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onOpen?: ((...args: any[]) => any) | undefined;
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
close: (...args: any[]) => void;
"update:modelValue": (...args: any[]) => void;
open: (...args: any[]) => void;
}, string, {
disabled: boolean;
openDelay: number;
closeDelay: number;
appendToBody: boolean;
zIndex: number;
clientOnlyPopoverContent: boolean;
placement: Placement_2;
tabindex: number;
offset: number;
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{
disabled: boolean;
openDelay: number;
closeDelay: number;
appendToBody: boolean;
zIndex: number;
clientOnlyPopoverContent: boolean;
placement: Placement_2;
tabindex: number;
offset: number;
}> & Omit<Readonly<{
modelValue: boolean;
placement?: Placement_2;
openDelay?: number;
closeDelay?: number;
tabindex?: number;
appendToBody?: boolean;
disabled?: boolean;
offset?: number;
customAppend?: string;
zIndex?: number;
clientOnlyPopoverContent?: boolean;
}> & Readonly<{
onClose?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onOpen?: ((...args: any[]) => any) | undefined;
}>, "disabled" | "openDelay" | "closeDelay" | "appendToBody" | "zIndex" | "clientOnlyPopoverContent" | "placement" | "tabindex" | "offset"> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
$slots: {
reference?(_: {}): any;
content?(_: {}): any;
};
}) | null;
input: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly modelValue: AppTimePickerModel;
readonly popoverVisible?: boolean | undefined;
readonly onBlur?: ((...args: any[]) => any) | undefined;
readonly onFocus?: ((...args: any[]) => any) | undefined;
readonly onInput?: ((...args: any[]) => any) | undefined;
readonly "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
readonly onClear?: ((...args: any[]) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "blur", ...args: any[]) => void) & ((event: "focus", ...args: any[]) => void) & ((event: "input", ...args: any[]) => void) & ((event: "update:model-value", ...args: any[]) => void) & ((event: "clear", ...args: any[]) => void);
$el: any;
$options: ComponentOptionsBase<Readonly<{
modelValue: AppTimePickerModel;
popoverVisible?: boolean;
}> & Readonly<{
onBlur?: ((...args: any[]) => any) | undefined;
onFocus?: ((...args: any[]) => any) | undefined;
onInput?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
onClear?: ((...args: any[]) => any) | undefined;
}>, {
focus: () => void;
blur: () => void;
remove: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
blur: (...args: any[]) => void;
focus: (...args: any[]) => void;
input: (...args: any[]) => void;
"update:model-value": (...args: any[]) => void;
clear: (...args: any[]) => void;
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{}> & Omit<Readonly<{
modelValue: AppTimePickerModel;
popoverVisible?: boolean;
}> & Readonly<{
onBlur?: ((...args: any[]) => any) | undefined;
onFocus?: ((...args: any[]) => any) | undefined;
onInput?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
onClear?: ((...args: any[]) => any) | undefined;
}>, "blur" | "focus" | "remove"> & ShallowUnwrapRef< {
focus: () => void;
blur: () => void;
remove: () => void;
}> & {} & ComponentCustomProperties & {} & {
$slots: {
separator?(_: {}): any;
};
}) | null;
content: CreateComponentPublicInstanceWithMixins<Readonly<{
modelValue?: AppTimePickerModel;
}> & Readonly<{
"onUpdate:modelValue"?: ((modelValue: AppTimePickerModel) => any) | undefined;
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (modelValue: AppTimePickerModel) => any;
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<{
modelValue?: AppTimePickerModel;
}> & Readonly<{
"onUpdate:modelValue"?: ((modelValue: AppTimePickerModel) => any) | undefined;
}>, {}, {}, {}, {}, {}> | null;
};
attrs: Partial<{}>;
};
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
declare type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
new (): {
$slots: S;
};
};
export declare const AppDateTimePicker: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export declare interface AppDateTimePickerExpose {
popoverVisible: Ref<boolean>;
blur(): void;
focus(): void;
}
declare type AppDateTimePickerFirstDayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;
declare const AppDateTimePickerMode: {
Day: "day";
Year: "year";
Month: "month";
};
declare type AppDateTimePickerMode = (typeof AppDateTimePickerMode)[keyof typeof AppDateTimePickerMode];
declare type AppDateTimePickerModel = null | Date | (null | Date)[];
declare type AppDateTimePickerMonthFormat = 'long' | 'short' | 'narrow' | 'numeric' | '2-digit';
export declare interface AppDateTimePickerProps extends AppPickerProps {
/**
* The value of the picker. (Date, [Date, Date], null, [null, null])
*/
modelValue?: AppDateTimePickerModel;
/**
* format is designed to display the date in the input data
*/
dateFormat?: string;
/**
* format is for displaying the time in the time input (ie in 'datetime', 'datetimerange' modes)
*/
timeFormat?: string;
/**
* Generate the format for the picker with the “datetime” or “datetimerange” types from the “dateFormat” & “timeFormat” options
*/
combineFormats?: boolean;
/**
* The option indicates which type of picker should be displayed. ('date', 'datetime', 'daterange', 'datetimerange')
* Default: 'date'
*/
type?: AppDateTimePickerType;
/**
* An option that indicates what type of calendar will be displayed. (day, month, year)
*/
mode?: AppDateTimePickerMode;
/**
* The option is responsible for the order of the days of the week in the day calendar. (1, 2, 3, 4, 5, 6, 7)
*/
firstDayOfWeek?: AppDateTimePickerFirstDayOfWeek;
/**
* The option indicates in what format the names of the days of the week should be displayed in the day calendar. ("long", "short", "narrow")
*/
weekdayFormat?: AppDateTimePickerWeekdayFormat;
/**
* The option specifies in what format to display the names of months in the calendar. ("long", "short", "narrow", "numeric", "2-digit")
*/
monthCellFormat?: AppDateTimePickerMonthFormat;
/**
* The parameter determines in what format the month name is displayed in the panel button. ("long", "short", "narrow", "numeric", "2-digit")
*/
monthButtonFormat?: AppDateTimePickerMonthFormat;
/**
* This option displays a list of shortcuts to quickly select a date.
* It is an array of objects
* {
* "text": string;
* "value": Date | null | (Date | null)[]
* }
*/
shortcuts?: AppDateTimePickerShortcut[];
/**
* The time that will be set by default.
* The expected format is “00:00:00”
* For a picker with a “range” type, you must pass an array (example “[‘12:00:00’, ‘13:00:00’]”)
*/
defaultTime?: string | string[];
/**
* The language in which you want to display data in the picker.
* (Use only if you do not have the “vue-i18n” package)
*/
locale?: Intl.LocalesArgument;
/**
* An option that is responsible for setting up the time picker. ("placeholder", "startPlaceholder", "endPlaceholder")
*/
timeOptions?: AppDateTimePickerTimeOptions;
/**
* Hide days that belong to another month
*/
hideOffsetDay?: boolean;
/**
* The option is used to define blocked dates
* @param date
*/
disabledDate?(date: Date): boolean;
}
export declare interface AppDateTimePickerShortcut {
text: string;
value?: AppDateTimePickerModel;
}
declare type AppDateTimePickerTimeOptions = Pick<AppTimePickerProps, 'placeholder' | 'startPlaceholder' | 'endPlaceholder'>;
declare const AppDateTimePickerType: {
Date: "date";
DateTime: "datetime";
DateRange: "daterange";
DateTimeRange: "datetimerange";
};
declare type AppDateTimePickerType = (typeof AppDateTimePickerType)[keyof typeof AppDateTimePickerType];
declare type AppDateTimePickerWeekdayFormat = 'long' | 'short' | 'narrow';
declare type AppPickerAlign = 'left' | 'center' | 'right';
declare interface AppPickerProps {
/**
* Picker is blocked
*/
disabled?: boolean;
/**
* The picker is read-only (the popover does not open)
*/
readonly?: boolean;
/**
* Entering a value via inputs is not available
*/
inputReadonly?: boolean;
/**
* Displaying a controller for clearing a data input when it is full
*/
clearable?: boolean;
/**
* the timezone parameter allows you to define the time zone that will be used to correct the time in the picker.
*
* How it works:
*
* 1. Local time - If the user is located in the Europe/Kyiv time zone and the date transmitted is 2025-01-27T12:00:00,
* the picker will show this time in the specified time zone.
*
* 2. Time correction - If the timezone is America/New_New_York, the picker will calculate the difference between
* Europe/Kyiv and America/New_New_York (for example, -7 hours)
* and display the time with this correction.
*/
timezone?: string;
/**
* The text that will be displayed in the input placeholder when the picker is of one type:
* 1. Date picker - ('date', datetime')
* 2. Time picker - props `isRange` = false
*/
placeholder?: string;
/**
* The text that will be displayed in the first input placeholder when the picker is of one type:
* 1. Date picker - ('daterage', datetimerange')
* 2. Time picker - props `isRange` = true
*/
startPlaceholder?: string;
/**
* The text that will be displayed in the last input placeholder when the picker is of one type:
* 1. Date picker - ('daterage', datetimerange')
* 2. Time picker - props `isRange` = true
*/
endPlaceholder?: string;
/**
* The position of the picker's display. (left, center, right)
*/
align?: AppPickerAlign;
/**
* The text displayed in the cancel button in the picker popover
*/
cancelText?: string;
/**
* The text displayed in the apply button in the picker popover
*/
applyText?: string;
/**
* An option indicating that the picker has an invalid value
*/
invalid?: boolean;
/**
* Delay in milliseconds before the popover opens after being triggered.
* Default: 0ms.
*/
openDelay?: number;
/**
* Delay in milliseconds before the popover closes after being triggered.
* Default: 150ms.
*/
closeDelay?: number;
/**
* Determines if the popover content should be appended to the `<body>`
* instead of being nested within the DOM structure of the component.
*/
appendToBody?: boolean;
/**
* Leave the picker open after opening it. Use it for debugging or researching a popover
*/
stayOpened?: boolean;
/**
* applying changes without clicking the Apply button
*/
autoApply?: boolean;
/**
* id for the initial native input (also used for the native input when there is only one)
*/
startId?: string;
/**
* id for the last native input
*/
endId?: string;
/**
* the name for the initial native input (also used for the custom input if there is only one)
*/
startName?: string;
/**
* the name for the last native input
*/
endName?: string;
/**
* The CSS z-index value for the picker's popover.
*/
zIndex?: number;
/**
* Render popover content inside <client-only> component. (Works only in SSR mode)
*/
clientOnlyPopoverContent?: boolean;
}
export declare const AppTimePicker: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
export declare interface AppTimePickerExpose {
popoverVisible: Ref<boolean>;
blur(): void;
focus(): void;
}
declare type AppTimePickerModel = null | Date | (null | Date)[];
export declare interface AppTimePickerProps extends AppPickerProps {
/**
* The value of the picker. (Date, [Date, Date], null, [null, null])
*/
modelValue?: AppTimePickerModel;
/**
* format is for displaying the time in the time input
*/
format?: string;
/**
* The option is responsible for enabling the time range selection mode
*/
isRange?: boolean;
/**
* The option indicates what default time should be set in the picker when it is opened
* If the “isRange” option is enabled, you must pass the value in the format - [Date, Date].
* Default: new Date()
*/
defaultTime?: Date | Date[];
/**
* This option is responsible for setting the time selection range.
* Format “00:00:00 - 23:59:59”
* If the “isRange” option is enabled, you need to pass an array - ["00:00:00 - 12:30:00", "12:30:00 - 23:59:59"]
*/
selectableRange?: string | string[];
}
declare function externalInputValue(value: unknown): void;
declare function externalInputValue_2(value: unknown): void;
declare function handleFocus(): void;
declare function handleFocus_2(): void;
export { }