Copyright © 2023 MIT License. | Design and development by Yury Uvarov.
💢 Usage example — a website example for searching for flight tickets and hotels using vanilla-calendar.


DOM Templates

The calendar provides a convenient way to customize the HTML markup using the DOMTemplates parameter. This allows you to add your own elements, such as buttons or any other HTML elements, to the calendar.

DOMTemplates takes the calendar type as the key and a string as the value.

In the following example, the calendar header is customized for type: 'default', and a regular button is added inside the calendar.

Now let's use the input: true parameter. We'll add a button that will hide the calendar when clicked.