The Calendar object does not put
type='button' on the button elements within it.
If your calendar element is nested inside a form element- this will cause the form to interpret the button press (Such as changing months) as a submit button.
As a temporary patch for this, I am doing the following:
$calendar.find("button").attr("type", "button"); calendar.events.on("ModeChange", (mode) => setTimeout(() => $calendar.find("button").attr("type", "button"), 50)); // Timeout is needed to catch the cancel button