A small date picker built with Svelte. Demo available here: svelte-calendar
<Datepicker
format="{dateFormat}"
start={threeDaysInPast}
end={inThirtyDays}
selectableCallback={noWeekendsSelectableCallback}
/>
start
& end
are Date objects.
format
Date formatting uses timeUtils formatting.
selectableCallback
should be a function that accepts a single date as an argument and return true (if selectable) or false (if unavailable).
Note that you will need to have Node.js installed.
Install the dependencies...
cd svelte-calendar
npm install
...then start Rollup:
npm run dev
Navigate to localhost:5000. You should see your app running. Edit a component file in src
, save it, and your browser will reload the page so you can see your changes automatically.