Selecting and Changing Time
When upgrading from a version without extensions, keep your existing options and callbacks. For ESM, add the named import and register time in the constructor with extensions: [time]. Do not call the extension. Importing or registering it does not enable the feature by itself.
import { Calendar, time } from 'vanilla-calendar-pro';
new Calendar('#calendar', {
extensions: [time],
selectionTimeMode: 24,
}).init();By activating the selectionTimeMode parameter, you gain the ability to automatically receive the necessary data with each change of time.