Scheduler - mock date in demo for screenshots testing - #35054
Merged
Conversation
pharret31
approved these changes
Sep 4, 2026
sjbur
approved these changes
Sep 4, 2026
Contributor
There was a problem hiding this comment.
🟡 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
recurrenceEndUntilEditorvalue to a fixed date. - Added a
valueChangedhandler 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)); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.