UNPKG

@komgrip/vue-flatpickr

Version:

A lightweight and customizable date/time picker component for Vue.js applications

96 lines (95 loc) 3.42 kB
import { PropType } from 'vue'; import flatpickr from '@komgrip/flatpickr'; declare const _default: import("vue").DefineComponent<{ options: { type: PropType<Partial<import("@komgrip/flatpickr/dist/types/options").BaseOptions>>; default: () => { defaultDate: null; wrap: boolean; }; }; modelValue: { type: PropType<import("@komgrip/flatpickr/dist/types/options").DateOption | import("@komgrip/flatpickr/dist/types/options").DateOption[] | null>; required: true; }; disabled: { type: BooleanConstructor; default: boolean; }; wrap: { type: BooleanConstructor; default: boolean; }; mode: { type: PropType<"single" | "multiple" | "range" | "time">; default: string; }; events: { type: PropType<import("@komgrip/flatpickr/dist/types/options").HookKey[]>; default: () => import("@komgrip/flatpickr/dist/types/options").HookKey[]; }; }, unknown, { fp: import("@komgrip/flatpickr/dist/types/instance").Instance | null; }, {}, { prepareConfig(): flatpickr.Options.Options; /** * Get the HTML node where flatpickr to be attached * Bind on parent element if wrap is true */ getElem(): HTMLInputElement; /** * Watch for value changed by date-picker itself and notify parent component */ onInput(_event: InputEvent): void; onChange(selectedDates: Date[], _dateStr: string, _instance: flatpickr.Instance): void; fpInput(): HTMLInputElement; /** * Blur event is required by many validation libraries */ onBlur(event: Event): void; /** * Flatpickr does not emit input event in some cases */ onClose(_selectedDates: Date[], _dateStr: string): void; /** * Watch for the disabled property and sets the value to the real input. */ watchDisabled(newState: boolean): void; }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ options: { type: PropType<Partial<import("@komgrip/flatpickr/dist/types/options").BaseOptions>>; default: () => { defaultDate: null; wrap: boolean; }; }; modelValue: { type: PropType<import("@komgrip/flatpickr/dist/types/options").DateOption | import("@komgrip/flatpickr/dist/types/options").DateOption[] | null>; required: true; }; disabled: { type: BooleanConstructor; default: boolean; }; wrap: { type: BooleanConstructor; default: boolean; }; mode: { type: PropType<"single" | "multiple" | "range" | "time">; default: string; }; events: { type: PropType<import("@komgrip/flatpickr/dist/types/options").HookKey[]>; default: () => import("@komgrip/flatpickr/dist/types/options").HookKey[]; }; }>> & { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; }, { mode: "single" | "multiple" | "range" | "time"; wrap: boolean; options: Partial<import("@komgrip/flatpickr/dist/types/options").BaseOptions>; disabled: boolean; events: import("@komgrip/flatpickr/dist/types/options").HookKey[]; }, {}>; export default _default;