Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
vanilla-calendar-pro
Advanced tools
The Vanilla Calendar Pro is a versatile JavaScript date and time picker component with TypeScript support, making it compatible with any JavaScript frameworks and libraries. It is designed to be lightweight, easy to use, and feature-rich, without relying
VanillaCalendar is a versatile JavaScript date and time picker with TypeScript support, making it compatible with any JavaScript framework or library. It is designed to be lightweight, simple to use, and feature-rich without relying on external dependencies.
<input>
tag.VanillaCalendar is compatible with a wide range of browsers:
57+ ✔ | 52+ ✔ | 80+ ✔ | 44+ ✔ | 10.1+ ✔ |
This plugin is completely free, and your support is important. Please feel free to report any issues or share your new ideas; it's really important!
If you like VanillaCalendar, please consider giving it a 🌟 star on GitHub.
You can install VanillaCalendar using npm or yarn:
npm install vanilla-calendar-pro
# or
yarn add vanilla-calendar-pro
If you prefer not to use a package manager, you can also include it via CDN or download it from the website.
Here's a simple example of how to use VanillaCalendar in your HTML:
<html>
<head>
</head>
<body>
<div id="calendar"></div>
<!-- or -->
<!-- <input type="text" id="calendar-input"> -->
</body>
</html>
To add the necessary styles and scripts, you can use the following code:
import VanillaCalendar from 'vanilla-calendar-pro';
import 'vanilla-calendar-pro/styles/vanilla-calendar-pro.min.css';
// Initialize the calendar
const calendar = new VanillaCalendar('#calendar');
calendar.init();
// or
// const calendarWithInput = new VanillaCalendar('#calendar-input', { input: true });
// calendarWithInput.init();
If you're not using a package manager and prefer manual installation or CDN usage, you can include the necessary files in your HTML document's <head>
:
<html>
<head>
<link href="./vanilla-calendar.min.css" rel="stylesheet">
<script src="./vanilla-calendar.min.js" defer></script>
</head>
<body>
<div id="calendar"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const calendar = new VanillaCalendar('#calendar');
calendar.init();
});
</script>
</body>
</html>
// Only layout calendar
import 'vanilla-calendar-pro/build/vanilla-calendar.layout.min.css';
// Themes
import 'vanilla-calendar-pro/build/themes/light.min.css';
import 'vanilla-calendar-pro/build/themes/dark.min.css';
VanillaCalendar includes two CSS themes: the light theme and the dark theme.
The calendar will automatically display the theme according to the user's system preferences. If you want to apply a specific theme, it is recommended to import «vanilla-calendar.layout.min.css» along with the theme you prefer: «light.min.css» or «dark.min.css», instead of «vanilla-calendar.min.css».
VanillaCalendar features customizable DOM templates that allow you to modify the structure of the calendar to fit your needs. The templates are identified by tags containing the # character, and they should include a trailing slash at the end.
Here's an example of the default template:
new VanillaCalendar('#calendar', {
DOMTemplates: {
default: `
<div class="vanilla-calendar-header">
<#ArrowPrev />
<div class="vanilla-calendar-header__content">
<#Month />
<#Year />
</div>
<#ArrowNext />
</div>
<div class="vanilla-calendar-wrapper">
<#WeekNumbers />
<div class "vanilla-calendar-content">
<#Week />
<#Days />
</div>
</div>
<#ControlTime />
`
}
});
For detailed instructions on using VanillaCalendar in a React component with TypeScript, please visit the website for comprehensive documentation and examples.
For detailed information on the available parameters and settings, please refer to the API reference.
This project is tested with BrowserStack.
MIT License
Yury Uvarov (uvarov.frontend@gmail.com)
FAQs
The Vanilla Calendar Pro is a versatile JavaScript date and time picker component with TypeScript support, making it compatible with any JavaScript frameworks and libraries. It is designed to be lightweight, easy to use, and feature-rich, without relying
The npm package vanilla-calendar-pro receives a total of 3,310 weekly downloads. As such, vanilla-calendar-pro popularity was classified as popular.
We found that vanilla-calendar-pro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.