Skip to content

Conversation

@anna-shakhova
Copy link
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Jan 23, 2026
@anna-shakhova anna-shakhova requested a review from a team as a code owner January 23, 2026 10:48
Copilot AI review requested due to automatic review settings January 23, 2026 10:48
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

Fixes FilterBuilder’s handling of invalid date values by preventing attempts to format invalid Date instances and expanding/relocating related test coverage.

Changes:

  • Treat invalid Date objects as invalid input in formatHelper.format() (returning value.toString() instead of passing them to date localization formatting).
  • Adjust FilterBuilder value formatting to avoid coercing non-string/non-numeric values into Date objects.
  • Update/add tests: expand formatHelper.format() coverage and move FilterBuilder formatting tests from QUnit to Jest (plus add a regression case).

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/testing/tests/DevExpress.utils/utils.formatHelper.tests.js Switches to ESM import and adds QUnit coverage for formatHelper.format() edge cases (including invalid dates).
packages/devextreme/testing/tests/DevExpress.ui.widgets/filterBuilderParts/utilsTests.js Removes the old QUnit “Formatting” module tests (migrated to Jest).
packages/devextreme/js/format_helper.js Prevents formatting invalid Date values by validating getTime() before delegating to date localization.
packages/devextreme/js/__internal/filter_builder/m_utils.ts Updates FilterBuilder value-to-text formatting (incl. typed refactor) to avoid unintended Date coercions.
packages/devextreme/js/__internal/filter_builder/tests/utils.test.ts Adds Jest coverage for FilterBuilder value formatting, including an invalid date string regression.

@anna-shakhova anna-shakhova force-pushed the 26_1__T1319193-filter-builder-date-format branch from 4e80475 to c311758 Compare January 23, 2026 11:13
@anna-shakhova anna-shakhova changed the title FilterBuilder: fix invalid date formatting FilterBuilder: fix invalid date formatting (T1319193) Jan 23, 2026
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.

1 participant