Skip to content

feat(kumo): add DatePicker component built on react-day-picker v9#81

Open
mattrothenberg wants to merge 5 commits intocloudflare:mainfrom
mattrothenberg:feat/date-picker
Open

feat(kumo): add DatePicker component built on react-day-picker v9#81
mattrothenberg wants to merge 5 commits intocloudflare:mainfrom
mattrothenberg:feat/date-picker

Conversation

@mattrothenberg
Copy link
Collaborator

@mattrothenberg mattrothenberg commented Feb 12, 2026

Summary

Adds a new DatePicker component to the Kumo component library, built on top of react-day-picker v9.

Untitled.mov

Features

  • Three selection modes: single, multiple, and range date selection
  • Full i18n support: via locale prop (pass any date-fns locale)
  • Timezone support: via timeZone prop
  • Kumo-native styling: ~500 lines of CSS using semantic tokens, no external CSS import
  • Maximum flexibility: forwards all react-day-picker props

Changes

  • New DatePicker component with full TypeScript types
  • 8 demo examples including presets with active state indication
  • Documentation page with usage examples and API reference
  • Recommendation banner added to DateRangePicker docs suggesting the new component
  • Updated lint rule to allow components without KUMO_*_VARIANTS exports
  • Updated registry codegen to handle variant-less components

Screenshots

Light Dark
Single mode, range mode, presets Automatic dark mode via Kumo tokens

Testing

  • pnpm --filter @cloudflare/kumo build
  • pnpm typecheck
  • pnpm lint ✅ (0 errors)

Notes

  • Does NOT modify or break the existing DateRangePicker component
  • Kept simple intentionally - no size or variant props
  • Uses date-fns v4 (comes with react-day-picker v9)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 12, 2026

npm i https://pkg.pr.new/@cloudflare/kumo@81

commit: 1588b8a

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Docs Preview

View docs preview

Commit: 1588b8a

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Visual Regression Report

4 screenshot(s) with visual changes:

Button / Loading State

Before After
Before After

Select / Select

Before After
Before After

Select / Select.Option

Before After
Before After

Select (Open)

Before After
Before After
9 screenshot(s) unchanged
  • Button / Variants
  • Button / Sizes
  • Button / With Icon
  • Button / Icon Only
  • Button / Disabled State
  • Dialog / Basic Dialog
  • Dialog / Confirmation Dialog (Alert)
  • Dialog / With Actions
  • Dialog (Open)

Generated by Kumo Visual Regression

- Support single, multiple, and range date selection modes
- Full i18n support via locale prop, timezone via timeZone prop
- Styled entirely with Kumo semantic tokens (no external CSS)
- Forward all react-day-picker props for maximum flexibility
- Add 8 demo examples including presets with active state
- Add recommendation banner to DateRangePicker docs
- Update lint rule to allow components without KUMO_*_VARIANTS exports
- Remove manual prop destructuring, just spread to DayPicker
- Use DayPickerProps type directly from react-day-picker
- Keep defaults: showOutsideDays, animate, Phosphor chevrons
- Fix TypeScript error in preset demo
- Rebuild discriminated union types to preserve full type inference
- onChange maps to react-day-picker's onSelect internally
- Update all demos and docs to use onChange
- Add docs note explaining the difference from react-day-picker
- Remove padding from day cells so range buttons connect seamlessly
- Style range start/middle/end buttons with proper border-radius
- Range start: rounded left, square right
- Range middle: square on both sides
- Range end: square left, rounded right
- Add border-spacing: 0 to month grid
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