Svelte Calendar

A lightweight datepicker with neat animations and a unique UX.

screenshot of Svelte Calendar


The Svelte Calendar is a small date picker built with Svelte 3. It offers various features such as day, month, and year pickers, keyboard, touch, and scroll support, inline and picker modes, and a virtual/infinite grid for animation performance. It also supports localization using day.js.


  • Day, Month & Year pickers: Allows users to easily select a specific day, month, or year.
  • Responsive: The calendar is designed to be responsive and adapt to different screen sizes.
  • Keyboard, touch, and scroll support: Users can interact with the calendar using a variety of input methods.
  • Inline & Picker modes: The calendar can be used either as an inline component or as a pop-up picker.
  • Virtual/infinite grid for animation performance: The calendar utilizes a virtual grid to optimize animation performance.
  • Store-driven and extensible: The calendar can be easily integrated with existing Svelte stores and extended to fit specific needs.
  • Localization using day.js: Supports localization with the help of the day.js library.


To use the Svelte Calendar component within a Svelte-Kit application, follow these steps:

  1. Install the necessary dependencies by running the following command:
npm install just-throttle dayjs
  1. Open the svelte.config.js file and add the following code to include the dependencies in the config.kit.vite.optimizeDeps.include array:
optimizeDeps: {
    include: ['just-throttle', 'dayjs']
  1. Now you can import and use the Svelte Calendar component in your Svelte-Kit project.


The Svelte Calendar is a feature-rich date picker built with Svelte 3. It offers various pickers, supports responsive design and multiple input methods, and provides performance optimization with its virtual grid. It can be easily integrated with existing Svelte stores and supports localization using the day.js library. To use it in a Svelte-Kit project, make sure to install the required dependencies and include them in the project configuration.


Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.


ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Prism JS

PrismJS is an open-source, lightweight, and extensible syntax highlighting library that supports a wide range of programming languages and markup formats.


TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.