Svelte-Calendar

Svelte Calendar

svelte-calendar

A small date picker built with Svelte. Demo available here: svelte-calendar

Basic usage (svelte v2):

<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).

Developing/Modifying Svelte-Calendar Guide:

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.

Top categories

Loading Svelte Themes