@custom_okoshko/svelte
v0.1.0-beta.1
Published
Svelte 5 component and action for @custom_okoshko/core calendar.
Readme
@custom_okoshko/svelte
Компонент и action для Svelte 5 поверх @custom_okoshko/core.
npm i @custom_okoshko/svelte @custom_okoshko/themes @custom_okoshko/locales<script>
import '@custom_okoshko/themes/base.css';
import '@custom_okoshko/themes/light.css';
import { Calendar, calendar } from '@custom_okoshko/svelte';
import { ru } from '@custom_okoshko/locales/ru';
let value = $state(null);
</script>
<Calendar bind:value locale={ru}>{value ?? 'Выбрать дату'}</Calendar>
<div use:calendar={{ inline: true, mode: 'range', onChange }}></div>bind:value,bind:instance(инстанс ядра), колбэки — пропсы (onChange,onDateClick, …).
Документация и живые демо: DOCS_URL
Лицензия MIT.
