From a821f4e5d3ad01cbb3207f32da3ffdd5e42ff85c Mon Sep 17 00:00:00 2001 From: Alex Klimenkov Date: Fri, 20 Mar 2026 21:28:28 +0300 Subject: [PATCH 1/2] [dev] add description for custom recurring modal --- docs/guides/recurring-events.md | 42 ++++++++++++++++++ docs/integrations/react/overview.md | 69 +++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/docs/guides/recurring-events.md b/docs/guides/recurring-events.md index f449bf4..5727d94 100644 --- a/docs/guides/recurring-events.md +++ b/docs/guides/recurring-events.md @@ -471,6 +471,48 @@ For example: addEventListener(node, "click", function(){...}) ~~~ +## Custom confirmation modal + +When a user edits or drags a recurring event, the scheduler displays a built-in modal that asks whether to modify just this occurrence, this and following events, or the entire series. You can replace it with your own UI by overriding `scheduler.ext.recurring.confirm`. + +~~~js +scheduler.ext.recurring.confirm = function(context) { + // context contains: + // - origin: "lightbox" | "dnd" + // - occurrence: the occurrence event object + // - series: the parent series event object + // - labels: { title, ok, cancel, occurrence, following, series } + // - options: ["occurrence", "following", "series"] + // + // Return one of: "occurrence", "following", "series", or null to cancel. + // Can return a Promise for async UI. + + return new Promise(function(resolve) { + myCustomDialog.show({ + title: context.labels.title, + options: context.options, + onSelect: function(choice) { resolve(choice); }, + onCancel: function() { resolve(null); } + }); + }); +}; +~~~ + +The context object has the following properties: + +| Property | Type | Description | +|---|---|---| +| `origin` | `"lightbox" \| "dnd"` | Whether the action was triggered from the lightbox or drag-and-drop | +| `occurrence` | `object` | The specific occurrence being edited | +| `series` | `object` | The parent recurring event | +| `labels` | `object` | Localized strings: `title`, `ok`, `cancel`, `occurrence`, `following`, `series` | +| `options` | `string[]` | Available choices, e.g. `["occurrence", "following", "series"]` | + +The function must return `"occurrence"`, `"following"`, `"series"`, or `null` to cancel. It can return the value directly or as a Promise. + +For a React implementation, see the [React Scheduler documentation](integrations/react/overview.md#customizing-the-recurrence-confirmation-modal). + + ## Legacy format of recurring events Until v7.1 Scheduler used a custom format for recurring events, you can find the format details [here](guides/recurring-events-legacy.md). diff --git a/docs/integrations/react/overview.md b/docs/integrations/react/overview.md index 87c22ee..ce903fc 100644 --- a/docs/integrations/react/overview.md +++ b/docs/integrations/react/overview.md @@ -351,6 +351,75 @@ The delete confirmation dialog can be overridden via `modals`. /> ``` +### Customizing the Recurrence Confirmation Modal + +When a user edits or drags a recurring event, a confirmation modal asks whether to modify just this occurrence, this and following events, or the entire series. You can replace this built-in dialog with your own using `modals.onRecurrenceConfirm`. + +The callback receives a context object and must return a decision (or a Promise that resolves to one): + +| Field | Type | Description | +|---|---|---| +| `origin` | `"lightbox" \| "dnd"` | Whether the action was triggered from the lightbox or drag-and-drop | +| `occurrence` | `any` | The specific occurrence being edited | +| `series` | `any` | The parent recurring event | +| `labels` | `object` | Localized labels: `title`, `ok`, `cancel`, `occurrence`, `following`, `series` | +| `options` | `string[]` | Available choices, e.g. `["occurrence", "following", "series"]` | + +Return value (`RecurrenceDecision`): `"occurrence"`, `"following"`, `"series"`, or `null` to cancel. + +Minimal example using `window.confirm`: + +```tsx + { + const choice = window.prompt( + `${context.labels.title}\nOptions: ${context.options.join(", ")}` + ); + return context.options.includes(choice) ? choice : null; + }, + }} +/> +``` + +Full example with a custom React dialog: + +```tsx +import { useState, useCallback } from "react"; + +function App() { + const [recurrencePrompt, setRecurrencePrompt] = useState(null); + + const onRecurrenceConfirm = useCallback((context) => { + return new Promise((resolve) => { + setRecurrencePrompt({ context, resolve }); + }); + }, []); + + return ( + <> + + {recurrencePrompt && ( + { + recurrencePrompt.resolve(choice); + setRecurrencePrompt(null); + }} + onCancel={() => { + recurrencePrompt.resolve(null); + setRecurrencePrompt(null); + }} + /> + )} + + ); +} +``` + ## Filtering Use the `filter` prop to control which events are displayed: From 63316babc874c3ecfc9ed92820ecb050351016ad Mon Sep 17 00:00:00 2001 From: Alex Klimenkov Date: Sat, 21 Mar 2026 02:50:24 +0300 Subject: [PATCH 2/2] [add] whats-new.md for v7.1.12 --- docs/guides/recurring-events.md | 2 +- docs/integrations/react/overview.md | 19 ++----------------- docs/whats-new.md | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/docs/guides/recurring-events.md b/docs/guides/recurring-events.md index 5727d94..0d794d1 100644 --- a/docs/guides/recurring-events.md +++ b/docs/guides/recurring-events.md @@ -471,7 +471,7 @@ For example: addEventListener(node, "click", function(){...}) ~~~ -## Custom confirmation modal +## Custom confirmation modal {#customconfirmationmodal} When a user edits or drags a recurring event, the scheduler displays a built-in modal that asks whether to modify just this occurrence, this and following events, or the entire series. You can replace it with your own UI by overriding `scheduler.ext.recurring.confirm`. diff --git a/docs/integrations/react/overview.md b/docs/integrations/react/overview.md index ce903fc..585cf6c 100644 --- a/docs/integrations/react/overview.md +++ b/docs/integrations/react/overview.md @@ -351,7 +351,7 @@ The delete confirmation dialog can be overridden via `modals`. /> ``` -### Customizing the Recurrence Confirmation Modal +### Customizing the Recurrence Confirmation Modal {#customizingtherecurrenceconfirmationmodal} When a user edits or drags a recurring event, a confirmation modal asks whether to modify just this occurrence, this and following events, or the entire series. You can replace this built-in dialog with your own using `modals.onRecurrenceConfirm`. @@ -367,22 +367,7 @@ The callback receives a context object and must return a decision (or a Promise Return value (`RecurrenceDecision`): `"occurrence"`, `"following"`, `"series"`, or `null` to cancel. -Minimal example using `window.confirm`: - -```tsx - { - const choice = window.prompt( - `${context.labels.title}\nOptions: ${context.options.join(", ")}` - ); - return context.options.includes(choice) ? choice : null; - }, - }} -/> -``` - -Full example with a custom React dialog: +Example: ```tsx import { useState, useCallback } from "react"; diff --git a/docs/whats-new.md b/docs/whats-new.md index 7e452f3..061642d 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -7,6 +7,25 @@ sidebar_label: "What's New" If you are updating Scheduler from an older version, check [Migration From Older Versions](migration.md) for details. +7.2.12 +------------- +March 23, 2026. Bugfix release + +### Fixes + +- Fix the crash on page reload in [React Scheduler](integrations/react/overview.md) when using non-default themes with the [cookie](guides/extensions-list.md#cookie) plugin enabled +- Fix the regression where the `save` URL in the `data` prop was not applied correctly in [React Scheduler](integrations/react/overview.md) +- Fix the issue where editing a non-first occurrence of a [recurring event](guides/recurring-events.md) in "This and following events" mode did not apply all [lightbox](guides/configuring-the-lightbox.md) field changes +- Fix the issue where dynamically changing [Quick Info](guides/quick-info.md) buttons based on event conditions did not update the popup correctly +- Fix the issue where modifying the text of a single [recurring event](guides/recurring-events.md) occurrence was overwritten after editing a subsequent occurrence in "This and following events" mode +- Fix the overflow styles of the [Quick Info](guides/quick-info.md) popup to properly handle long event descriptions +- Fix the script error in [React Scheduler](integrations/react/overview.md) that occurred when adding events to an existing dataset via the `useState` function + +### Updates + +- Add the ability to replace the [recurring event confirmation modal](guides/recurring-events.md#customconfirmationmodal) with a custom dialog. +- Add the ability to replace the [recurring event confirmation modal](integrations/react/overview.md#customizingtherecurrenceconfirmationmodal) in [React Scheduler](integrations/react/overview.md) via the modals.onRecurrenceConfirm prop + 7.2.11 ------------- January 12, 2026. Bugfix release