Skip to content

Conversation

@sjbur
Copy link
Contributor

@sjbur sjbur commented Jan 13, 2026

No description provided.

@sjbur sjbur self-assigned this Jan 13, 2026
@sjbur sjbur added the 26_1 label Jan 13, 2026
@sjbur sjbur marked this pull request as ready for review January 14, 2026 12:47
@sjbur sjbur requested a review from a team as a code owner January 14, 2026 12:47
Copilot AI review requested due to automatic review settings January 14, 2026 12:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix the Scheduler appointment collector button to display correct date information when timezone conversion is applied. The fix refactors the _getDateText method to use timeZoneCalculator.createDate for timezone conversion and adds a TestCafe test to verify the behavior.

Changes:

  • Refactored _getDateText method to convert dates to grid timezone before formatting
  • Removed unused _getStartDate and _getEndDate helper methods
  • Added TestCafe test for appointment collector timezone handling

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/devextreme/js/__internal/scheduler/m_compact_appointments_helper.ts Refactored date text generation to apply timezone conversion; removed unused helper methods
e2e/testcafe-devextreme/tests/scheduler/timezones/appointmentCollectorTimezone.ts Added new TestCafe test to verify collector displays correct date after timezone conversion

return date ? new Date(date) : null;
}
_getDateText(appointment) {
const { startDate, endDate } = appointment;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

The direct destructuring of startDate and endDate from the appointment object bypasses the data accessor system. The old implementation used this.instance._dataAccessors.get('startDate', appointment) and this.instance._dataAccessors.get('endDate', appointment), which correctly handles custom field name mappings when users configure options like startDateExpr and endDateExpr. Direct property access will break when custom field names are used. The code should use the data accessors instead.

Suggested change
const { startDate, endDate } = appointment;
const startDate = this.instance._dataAccessors.get('startDate', appointment);
const endDate = this.instance._dataAccessors.get('endDate', appointment);

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 14, 2026 15:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings January 15, 2026 09:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

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.

2 participants