Skip to content

Commit 45f3ce0

Browse files
Merge pull request #1 from DHTMLX/next
v7.2.12
2 parents 29d595d + 63316ba commit 45f3ce0

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

docs/guides/recurring-events.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,48 @@ For example:
471471
addEventListener(node, "click", function(){...})
472472
~~~
473473

474+
## Custom confirmation modal {#customconfirmationmodal}
475+
476+
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`.
477+
478+
~~~js
479+
scheduler.ext.recurring.confirm = function(context) {
480+
// context contains:
481+
// - origin: "lightbox" | "dnd"
482+
// - occurrence: the occurrence event object
483+
// - series: the parent series event object
484+
// - labels: { title, ok, cancel, occurrence, following, series }
485+
// - options: ["occurrence", "following", "series"]
486+
//
487+
// Return one of: "occurrence", "following", "series", or null to cancel.
488+
// Can return a Promise for async UI.
489+
490+
return new Promise(function(resolve) {
491+
myCustomDialog.show({
492+
title: context.labels.title,
493+
options: context.options,
494+
onSelect: function(choice) { resolve(choice); },
495+
onCancel: function() { resolve(null); }
496+
});
497+
});
498+
};
499+
~~~
500+
501+
The context object has the following properties:
502+
503+
| Property | Type | Description |
504+
|---|---|---|
505+
| `origin` | `"lightbox" \| "dnd"` | Whether the action was triggered from the lightbox or drag-and-drop |
506+
| `occurrence` | `object` | The specific occurrence being edited |
507+
| `series` | `object` | The parent recurring event |
508+
| `labels` | `object` | Localized strings: `title`, `ok`, `cancel`, `occurrence`, `following`, `series` |
509+
| `options` | `string[]` | Available choices, e.g. `["occurrence", "following", "series"]` |
510+
511+
The function must return `"occurrence"`, `"following"`, `"series"`, or `null` to cancel. It can return the value directly or as a Promise.
512+
513+
For a React implementation, see the [React Scheduler documentation](integrations/react/overview.md#customizing-the-recurrence-confirmation-modal).
514+
515+
474516
## Legacy format of recurring events
475517

476518
Until v7.1 Scheduler used a custom format for recurring events, you can find the format details [here](guides/recurring-events-legacy.md).

docs/integrations/react/overview.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,60 @@ The delete confirmation dialog can be overridden via `modals`.
351351
/>
352352
```
353353
354+
### Customizing the Recurrence Confirmation Modal {#customizingtherecurrenceconfirmationmodal}
355+
356+
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`.
357+
358+
The callback receives a context object and must return a decision (or a Promise that resolves to one):
359+
360+
| Field | Type | Description |
361+
|---|---|---|
362+
| `origin` | `"lightbox" \| "dnd"` | Whether the action was triggered from the lightbox or drag-and-drop |
363+
| `occurrence` | `any` | The specific occurrence being edited |
364+
| `series` | `any` | The parent recurring event |
365+
| `labels` | `object` | Localized labels: `title`, `ok`, `cancel`, `occurrence`, `following`, `series` |
366+
| `options` | `string[]` | Available choices, e.g. `["occurrence", "following", "series"]` |
367+
368+
Return value (`RecurrenceDecision`): `"occurrence"`, `"following"`, `"series"`, or `null` to cancel.
369+
370+
Example:
371+
372+
```tsx
373+
import { useState, useCallback } from "react";
374+
375+
function App() {
376+
const [recurrencePrompt, setRecurrencePrompt] = useState(null);
377+
378+
const onRecurrenceConfirm = useCallback((context) => {
379+
return new Promise((resolve) => {
380+
setRecurrencePrompt({ context, resolve });
381+
});
382+
}, []);
383+
384+
return (
385+
<>
386+
<ReactScheduler
387+
modals={{ onRecurrenceConfirm }}
388+
/>
389+
{recurrencePrompt && (
390+
<MyRecurrenceDialog
391+
options={recurrencePrompt.context.options}
392+
labels={recurrencePrompt.context.labels}
393+
onSelect={(choice) => {
394+
recurrencePrompt.resolve(choice);
395+
setRecurrencePrompt(null);
396+
}}
397+
onCancel={() => {
398+
recurrencePrompt.resolve(null);
399+
setRecurrencePrompt(null);
400+
}}
401+
/>
402+
)}
403+
</>
404+
);
405+
}
406+
```
407+
354408
## Filtering
355409
356410
Use the `filter` prop to control which events are displayed:

docs/whats-new.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ sidebar_label: "What's New"
77

88
If you are updating Scheduler from an older version, check [Migration From Older Versions](migration.md) for details.
99

10+
7.2.12
11+
-------------
12+
<span class='release_date'>March 23, 2026. Bugfix release</span>
13+
14+
### Fixes
15+
16+
- 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
17+
- Fix the regression where the `save` URL in the `data` prop was not applied correctly in [React Scheduler](integrations/react/overview.md)
18+
- 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
19+
- Fix the issue where dynamically changing [Quick Info](guides/quick-info.md) buttons based on event conditions did not update the popup correctly
20+
- 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
21+
- Fix the overflow styles of the [Quick Info](guides/quick-info.md) popup to properly handle long event descriptions
22+
- Fix the script error in [React Scheduler](integrations/react/overview.md) that occurred when adding events to an existing dataset via the `useState` function
23+
24+
### Updates
25+
26+
- Add the ability to replace the [recurring event confirmation modal](guides/recurring-events.md#customconfirmationmodal) with a custom dialog.
27+
- 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
28+
1029
7.2.11
1130
-------------
1231
<span class='release_date'>January 12, 2026. Bugfix release</span>

0 commit comments

Comments
 (0)