Skip to content

fix(DateTimeRangePicker): preserve meridiem on Enter - #1245

Open
fallintoplace wants to merge 2 commits into
ClickHouse:mainfrom
fallintoplace:fix/datetime-range-picker-enter-meridiem
Open

fallintoplace wants to merge 2 commits into
ClickHouse:mainfrom
fallintoplace:fix/datetime-range-picker-enter-meridiem

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • What: Preserve the selected meridiem when Enter commits a time.
  • Why: Separate Enter conversion could drop pm.
  • Implementation: Reuse handleTimeChange for Enter.
  • Example: Enter on 2:37 pm keeps 2:37 pm.

Links and tickets

  • None.

Good to know

  • No visual or breaking changes.

Checklist

  • Breaking changes? (add migration notes in changesets)
  • Visual changes? (specify in changesets)
  • Design review needed?

Contribution

  • Sufficient research before PR
  • Self-reviewed the PR
  • Manually tested the changes (when applies - visual confirmation in Storybook)
  • build and build-storybook work locally
  • Tests and Stories are aligned with the changes

Accessibility

  • Keyboard - Enter keeps the selected meridiem when committing a time.
  • Names — Accessible names are unchanged.
  • Vision — No colors or focus styles changed.

Screenshots

  • Not applicable; there are no visual changes.

@changeset-bot

changeset-bot Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0786d31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@XOP

XOP commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

thank you for contribution, @fallintoplace !
please update the PR description according to the template.

@XOP
XOP requested review from hoorayimhelping and a balanced review from Copilot October 5, 2026 10:47
@XOP XOP added the bug Something isn't working label Oct 5, 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.

Copilot review overview

🟢 Approval recommended

The focused fix reuses existing conversion logic, includes regression coverage, and has no identified blocking issues.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes DateTimeRangePicker so committing a time with Enter preserves the selected meridiem.

Changes:

  • Reuses the existing time-change handler for Enter.
  • Adds regression coverage for preserving 2:37 pm.
  • Includes a patch changeset.

Validation was limited to static review; tests and interactive accessibility checks were not run.

File Description
src/​components/​DatePicker/​DateTimeRangePicker.tsx Reuses meridiem-aware logic on Enter.
src/​components/​DatePicker/​DateTimeRangePicker.test.tsx Tests that Enter preserves PM.
.changeset/​fix-datetime-range-picker-enter-meridiem.md Documents the patch fix.

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

@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Chromatic Storybook

Check Status Link
Storybook ✅ 642 stories published Open Storybook
UI Tests ✅ 642 tests unchanged Open build

Built from commit: c9d02557f8ef819ed2e0be6dacee2934f50f36b9 · Chromatic run

Statuses as of the end of the run. The build link shows the live review state.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants