date-picker-svelte
Version:
Date and time picker for Svelte
30 lines (29 loc) • 1.32 kB
TypeScript
import { SvelteComponentTyped } from "svelte";
import { type Locale } from './locale.js';
declare const __propDef: {
props: {
/** Date value. It's `null` if no date is selected */ value?: Date | null;
/** Initial date to show in the calendar when no value is selected */ initialBrowseDate?: Date;
/** Show a time picker with the specified precision */ timePrecision?: "minute" | "second" | "millisecond" | null;
/** The earliest year the user can select */ min?: Date;
/** The latest year the user can select */ max?: Date;
/** Disallow specific dates */ isDisabledDate?: ((dateToCheck: Date) => boolean) | null;
/** Locale object for internationalization */ locale?: Locale;
/** Wait with updating the date until a date is selected */ browseWithoutSelecting?: boolean;
};
events: {
focusout: FocusEvent;
select: CustomEvent<Date>;
} & {
[evt: string]: CustomEvent<any>;
};
slots: {
default: {};
};
};
export type DatePickerProps = typeof __propDef.props;
export type DatePickerEvents = typeof __propDef.events;
export type DatePickerSlots = typeof __propDef.slots;
export default class DatePicker extends SvelteComponentTyped<DatePickerProps, DatePickerEvents, DatePickerSlots> {
}
export {};