import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["div"]; type $Props = { /** * The picked date. * @default null */ value?: Date | null; /** * The date the calendar treats as today. Set it when rendering on the * server, so the server and the browser agree. * @default new Date() */ today?: Date; /** * Any day of the month on show. Defaults to the month of `value`, or * of `today`. * @default value ?? today */ month?: Date; /** * @default null */ minDate?: Date | null; /** * @default null */ maxDate?: Date | null; /** * Days that can't be picked, besides those outside `minDate` and * `maxDate`. * @default () => false */ isDateDisabled?: (date: Date) => boolean; /** * A language tag such as `"de"`, or a partial locale object. * @default "en" */ locale?: string | Partial; /** * First day of the week, 0 (Sunday) to 6 (Saturday). Defaults to the * locale's. */ firstDayOfWeek?: number | undefined; /** * Set to `true` to show ISO week numbers. * @default false */ weekNumbers?: boolean; /** * Accessible name of the calendar. * @default "Choose a date" */ labelText?: string; /** * Label of the previous month button. * @default "Previous month" */ previousLabelText?: string; /** * Label of the next month button. * @default "Next month" */ nextLabelText?: string; day?: (this: void, ...args: [{ date: Date; selected: boolean; today: boolean; disabled: boolean; outside: boolean }]) => void; [key: `data-${string}`]: unknown; }; export type DateCalendarProps = Omit<$RestProps, keyof $Props> & $Props; export default class DateCalendar extends SvelteComponentTyped< DateCalendarProps, { change: CustomEvent<{ value: Date }> }, { day: { date: Date; selected: boolean; today: boolean; disabled: boolean; outside: boolean }; } > {}