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.

Action handlers

Handling Click on a Day

Various actions are available for user interaction with the calendar, one of which is clickDay(). This action allows you to track the moment when a user clicks on a specific day in the calendar.

Example with logging the selected day to the console:

Please note that the selected day is represented as an array because the user can select not only one day but also a range of dates if allowed by the calendar parameters.