Skip to content

subpx/svelte-calendar

Repository files navigation

svelte-calendar

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

Basic usage (svelte v3):

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

About

A lightweight datepicker with neat animations and a unique UX.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 84.8%
  • JavaScript 15.2%