Skip to content

feat(datetimerangepicker): fix background transparency; allow setting default date tab#1006

Merged
hoorayimhelping merged 4 commits intomainfrom
bucky-update-datetimerangepicker
Apr 21, 2026
Merged

feat(datetimerangepicker): fix background transparency; allow setting default date tab#1006
hoorayimhelping merged 4 commits intomainfrom
bucky-update-datetimerangepicker

Conversation

@hoorayimhelping
Copy link
Copy Markdown
Member

  • When testing DateTimeRangePicker in an app, the background was transparent, which isn't apparent in the storybook. This fixes that.

  • This also adds the ability to set the default date tab to startDate or endDate for instances where picked dates will be in the past

  • Cleans up some of the common code as well

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: 81e330e

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 Minor

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

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@hoorayimhelping hoorayimhelping force-pushed the bucky-update-datetimerangepicker branch from 391f251 to d94670a Compare April 21, 2026 15:43
@github-actions

This comment was marked as outdated.

@hoorayimhelping hoorayimhelping force-pushed the bucky-update-datetimerangepicker branch from d94670a to 81e330e Compare April 21, 2026 15:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Claude finished @hoorayimhelping's task in 1m 8s —— View job


PR Review

  • Gather context and read changed files
  • Check status of previously flagged issues
  • Review current state of all changed files
  • Post final review

All previously flagged items are resolved. This PR is clean and ready to merge.

✅ Background fixCalendarRendererContainer correctly uses theme.click.datePicker.dateOption.color.background.default. No hardcoded colors anywhere in the changed files.

defaultActiveTab featureTabbedCalendar correctly initializes activeTab from defaultActiveTab via useState and syncs dynamic prop changes via useEffect (lines 593–597). Tab type is both exported from DateTimeRangePicker.tsx (line 566) and re-exported through index.ts (line 7) — consumers can import it directly.

✅ Test fixes — The misleading test name is now "preserves user-selected tab when defaultActiveTab is re-rendered with the same value" (line 568), and the typo 'setting a default acttive tab' is corrected to 'setting a default active tab' (line 399). Coverage spans initial state, behavioral interaction, and dynamic re-render scenarios.

Common.tsx refactor — Clean extraction with no breaking changes to consumers.


💡 Suggestion (non-blocking)

  • Changeset description (.changeset/wet-monkeys-ring.md): Per CONVENTIONS.md, minor feature changesets benefit from a short usage snippet. Worth adding:
    Adds the ability to set a default date tab between startDate and endDate (defaults to startDate)
    
    Usage:
    ```tsx
    <DateTimeRangePicker defaultActiveTab="endDate" onSelectDateRange={...} />

✅ Ready to merge.

@workflow-authentication-public
Copy link
Copy Markdown
Contributor

📚 Storybook Preview Deployed

✅ Preview URL: https://click-jg74aut62-clickhouse.vercel.app

Built from commit: b7400f86558cd594e0d91313ab041063faecfcb1

@hoorayimhelping hoorayimhelping merged commit bb8ebc8 into main Apr 21, 2026
9 checks passed
@hoorayimhelping hoorayimhelping deleted the bucky-update-datetimerangepicker branch April 21, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants