date-picker-svelte
Version:
Date and time picker for Svelte
40 lines (39 loc) • 1.98 kB
TypeScript
import { SvelteComponentTyped } from "svelte";
import type { Locale } from './locale.js';
declare const __propDef: {
props: {
/** Initial date to show in the calendar when no value is selected */ initialBrowseDate?: Date;
/** Date value */ value?: Date | null;
/** The earliest value the user can select */ min?: Date;
/** The latest value the user can select */ max?: Date;
/** Set the input element's ID attribute */ id?: string | null;
/** Placeholder text to show when input field is empty */ placeholder?: string;
/** Whether the text is valid */ valid?: boolean;
/** Disable the input **/ disabled?: boolean;
/** Require a value to submit form **/ required?: boolean;
/** Pass custom classes */ class?: string;
/** Locale object for internationalization */ locale?: Locale;
/** Format string */ format?: string;
text?: string;
/** Whether the date popup is visible */ visible?: boolean;
/** Close the date popup when a date is selected */ closeOnSelection?: boolean;
/** Wait with updating the date until a date is selected */ browseWithoutSelecting?: boolean;
/** Show a time picker with the specified precision */ timePrecision?: "minute" | "second" | "millisecond" | null;
/** Disallow specific dates */ isDisabledDate?: ((dateToCheck: Date) => boolean) | null;
/** Automatically adjust date popup position to not appear outside the screen */ dynamicPositioning?: boolean;
};
events: {
select: CustomEvent<Date>;
} & {
[evt: string]: CustomEvent<any>;
};
slots: {
default: {};
};
};
export type DateInputProps = typeof __propDef.props;
export type DateInputEvents = typeof __propDef.events;
export type DateInputSlots = typeof __propDef.slots;
export default class DateInput extends SvelteComponentTyped<DateInputProps, DateInputEvents, DateInputSlots> {
}
export {};