Installation and Usage
Vanilla Calendar Pro is easily integrated into any project. There are several installation methods, depending on how you prefer to manage dependencies and build your project.
Installation via Package Manager
The most common way to install Vanilla Calendar Pro is by using a package manager. This method is ideal for projects using Node.js and modern build tools.
- Install the package:
- Create an HTML element in the body of your document with an arbitrary CSS selector:
For demonstration purposes in this section, we will use
#calendar
as the CSS selector, but you can create and use any other selector.- Import the script, create a calendar instance, and initialize it in your JavaScript or TypeScript file.
- Import the styles in the same file. The
index.css
file contains the layout grid for the calendar, as well as light and dark themes.
You also have the option to include the layout and theme styles separately, like this:
- Full example of simple initialization without any custom settings:
As you may have noticed in this example, we are using a flat calendar view without using the «Input» field, if you are interested in how you can integrate a calendar into «Input», check out this example.
Local or CDN
If you need to quickly integrate Vanilla Calendar Pro without using build tools or package managers, you can include it via CDN or download the archive with the latest version and include it locally.