Skip to content

Scheduler - mock date in demo for screenshots testing - #35054

Merged
dmlvr merged 1 commit into
DevExpress:mainfrom
dmlvr:26_2_Scheduler_mock_date_in_demo
Sep 4, 2026
Merged

Scheduler - mock date in demo for screenshots testing#35054
dmlvr merged 1 commit into
DevExpress:mainfrom
dmlvr:26_2_Scheduler_mock_date_in_demo

Conversation

@dmlvr

@dmlvr dmlvr commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@dmlvr dmlvr self-assigned this Sep 4, 2026
@dmlvr dmlvr added the 26_2 label Sep 4, 2026
@dmlvr
dmlvr marked this pull request as ready for review September 4, 2026 13:14
@dmlvr
dmlvr requested a review from a team as a code owner September 4, 2026 13:14
Copilot AI lite review requested due to automatic review settings September 4, 2026 13:14
@dmlvr
dmlvr added this pull request to the merge queue Sep 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The added contentReady logic can accumulate duplicate valueChanged subscriptions across rerenders, leading to repeated handlers and unintended extra updates.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the Scheduler “ResolveTimeConflicts” demo implementations (Angular/React/ReactJS/Vue/jQuery) to force a deterministic recurrence “until” date so visual screenshot tests don’t depend on the runtime/system date.

Changes:

  • Hooked into the appointment popup form lifecycle to set the recurrenceEndUntilEditor value to a fixed date.
  • Added a valueChanged handler intended to re-apply the fixed date when the editor changes (depending on the selected recurrence end mode).
File summaries
File Description
apps/demos/Demos/Scheduler/ResolveTimeConflicts/Vue/App.vue Adds form contentReady logic to set a fixed recurrence “until” date in the Vue demo.
apps/demos/Demos/Scheduler/ResolveTimeConflicts/ReactJs/App.js Adds equivalent fixed “until” date logic for the React (JS) demo.
apps/demos/Demos/Scheduler/ResolveTimeConflicts/React/App.tsx Adds equivalent fixed “until” date logic for the React (TS) demo.
apps/demos/Demos/Scheduler/ResolveTimeConflicts/jQuery/index.js Adds equivalent fixed “until” date logic for the jQuery demo.
apps/demos/Demos/Scheduler/ResolveTimeConflicts/Angular/app/app.component.ts Adds equivalent fixed “until” date logic for the Angular demo.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +90 to +97
this.form?.on('contentReady', (contentReadyEvent: DxFormTypes.ContentReadyEvent) => {
const untilEditor = contentReadyEvent.component.getEditor('recurrenceEndUntilEditor');
untilEditor?.on('valueChanged', () => {
contentReadyEvent.component.getEditor('recurrenceRepeatEndEditor')?.option('value') !== 'until'
&& untilEditor?.option('value', new Date(2026, 8, 3));
});
untilEditor?.option('value', new Date(2026, 8, 3));
});
Comment on lines +177 to +184
e.component.on('contentReady', (contentReadyEvent: FormTypes.ContentReadyEvent) => {
const untilEditor = contentReadyEvent.component.getEditor('recurrenceEndUntilEditor');
untilEditor?.on('valueChanged', () => {
contentReadyEvent.component.getEditor('recurrenceRepeatEndEditor')?.option('value') !== 'until'
&& untilEditor?.option('value', new Date(2026, 8, 3));
});
untilEditor?.option('value', new Date(2026, 8, 3));
});
Comment on lines +152 to +159
e.component.on('contentReady', (contentReadyEvent) => {
const untilEditor = contentReadyEvent.component.getEditor('recurrenceEndUntilEditor');
untilEditor?.on('valueChanged', () => {
contentReadyEvent.component.getEditor('recurrenceRepeatEndEditor')?.option('value') !==
'until' && untilEditor?.option('value', new Date(2026, 8, 3));
});
untilEditor?.option('value', new Date(2026, 8, 3));
});
Comment on lines +244 to +251
e.component!.on('contentReady', (contentReadyEvent: DxFormTypes.ContentReadyEvent) => {
const untilEditor = contentReadyEvent.component.getEditor('recurrenceEndUntilEditor');
untilEditor?.on('valueChanged', () => {
contentReadyEvent.component.getEditor('recurrenceRepeatEndEditor')?.option('value') !== 'until'
&& untilEditor?.option('value', new Date(2026, 8, 3));
});
untilEditor?.option('value', new Date(2026, 8, 3));
});
Comment on lines +47 to +54
form.on('contentReady', (e) => {
const untilEditor = e.component.getEditor('recurrenceEndUntilEditor');
untilEditor.on('valueChanged', () => {
e.component.getEditor('recurrenceRepeatEndEditor').option('value') !== 'until'
&& untilEditor.option('value', new Date(2026, 8, 3));
});
untilEditor.option('value', new Date(2026, 8, 3));
});
Merged via the queue into DevExpress:main with commit f810dfc Sep 4, 2026
118 checks passed
@dmlvr
dmlvr deleted the 26_2_Scheduler_mock_date_in_demo branch September 4, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants