uvarov-frontend / vanilla-calendar-pro

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 on external dependencies.
https://vanilla-calendar.pro
Other
593 stars 67 forks source link

[BUG] Crush when set popup on some dates #337

Closed kudrin closed 56 minutes ago

kudrin commented 4 hours ago

⚠️ Important: Bug reports are accepted only for version 3.0.0 or above Before submitting a bug report, ensure that you are using at least version 3.0.0 of Vanilla Calendar Pro. Issues reported for earlier versions will not be addressed.


Describe the bug Crush when set popup on 30 dec or 31 dec

import { Calendar, type Options } from "vanilla-calendar-pro";

import "vanilla-calendar-pro/styles/index.css";

const options: Options = {
  type: "multiple",
  displayMonthsCount: 12,
  monthsToSwitch: 1,
  selectionDatesMode: "multiple",
  displayDatesOutside: false,
  popups: {
    "2024-12-31": {
      html: '<ul class="vc-popups"><li class="vc-rec-public-holiday">New Year Holiday</li></ul>',
      modifier: "vc-day-public-holiday",
    },
  },
};

const calendar = new Calendar("#calendar", options);
calendar.init();

CodeSandbox example (REQUIRED)

https://codesandbox.io/p/sandbox/zf9f9r

uvarov-frontend commented 4 hours ago

Thanks for the report, fixed by this commit 166d0580e5e8672bbf4172d84f5e591e77544c05, wait for the next release.

uvarov-frontend commented 56 minutes ago

Fixed in v3.0.1