Creating an Instance
new Calendar()
- creates an instance of Vanilla Calendar Pro, which is an encapsulation of the calendar, its settings, and methods.
<script>
tag, the object is available as a global variable window.VanillaCalendarPro.The Calendar
instance takes two parameters. The first required parameter can be a CSS selector or HTML element.
The CSS selector or HTML element can represent a wrapper for the calendar, in which the calendar will be initialized, or an «Input».
A calendar wrapper is a <div>
tag inside which the calendar itself will be initialized.
Initialization in a calendar wrapper:
«Input» in the context of this calendar does not necessarily mean an <input>
tag; it can be any HTML element, such as a <div>
.
When clicking on the «Input», a popup with the calendar will appear.
Initialization in an «Input»:
The second optional parameter is an object defining the settings and actions of the calendar.