Closed nstuyvesant closed 3 years ago
Reverting back to svelte-calendar@2.0.4 is my temporary workaround.
Same problem here with Svelte kit.
Didn't include dayjs
.
Using svelte-calendar@2.0.4
works.
Also having errors in VSCode (my project is a typescript one)
2.0.4
: SX element type 'Datepicker' does not have any construct or call signatures.
3.x
: Type '{}' is not assignable to type 'IntrinsicAttributes & { formatted: string; selected?: Date; start?: Date; end?: Date; theme?: {}; defaultTheme?: any; format?: string; store?: { set: (this: void, value: { open: boolean; ... 8 more ...; activeViewDirection: number; }) => void; ... 11 more ...; getCalendarPage(month: any, year: any): { ...; }[]; }; }'. Property 'formatted' is missing in type '{}' but required in type '{ formatted: string; selected?: Date; start?: Date; end?: Date; theme?: {}; defaultTheme?: any; format?: string; store?: { set: (this: void, value: { open: boolean; hasChosen: boolean; selected: any; start: Date; ... 5 more ...; activeViewDirection: number; }) => void; ... 11 more ...; getCalendarPage(month: any, ye...'
Wonderful calendar by the way!
Packaging configuration updates have been applied and sveltekit-specific instructions have been added to the README. Please re-open/comment if you are continuing to have issues after updating svelte-calendar and updating your svelte.config.js
.
After explicitly adding dayjs to my devDependencies in my package.json per https://github.com/6eDesign/svelte-calendar/issues/125, I get:
when doing an
npm run dev -- --open
with a fresh SvelteKit project that imports Datepicker and uses the component on /src/routes/index.svelte.