Skip to content

feat(date-picker): refresh styling with Kumo tokens - #900

Open
khoinguyenpham04 wants to merge 2 commits into
cloudflare:mainfrom
khoinguyenpham04:noah/date-picker-refresh
Open

khoinguyenpham04 wants to merge 2 commits into
cloudflare:mainfrom
khoinguyenpham04:noah/date-picker-refresh

Conversation

@khoinguyenpham04

@khoinguyenpham04 khoinguyenpham04 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Refreshes DatePicker's styling with Kumo tokens. It keeps the component's layout model from early feedback: no internal padding, so the container sets the spacing, and the previous and next buttons grouped together at the end of the header.

Before and after

Current Suggested
Current DatePicker in dark mode Suggested DatePicker in dark mode
Current DatePicker in light mode Suggested DatePicker in light mode
Current two-month range Suggested two-month range
Current range with presets in a Popover Suggested range with presets in a Popover

Month and year dropdowns (captionLayout="dropdown"), now styled:

Suggested DatePicker with month and year dropdowns

Changes

  • DatePicker's styles live in date-picker.tsx as Kumo token classes on each react-day-picker part, so it follows the active theme, FedRAMP included. The .rdp-* block in kumo.css is removed.
  • The month-change animations move to kumo-binding.css, so kumo-standalone.css now includes DatePicker styles and animations too. They respect prefers-reduced-motion.
  • Days are 32px squares in 36px columns with 8px between weeks and 14px text. The previous and next buttons are borderless squares that match the days.
  • Two-month views sit side by side, and range bands are rounded at their ends and where weeks wrap.
  • Month and year dropdowns are styled, and the arrows flip in RTL.
  • Minor changeset: anyone customizing DatePicker through .rdp-* rules or --rdp-* variables would move to the classNames prop.

Docs

  • The inline examples set their own spacing with className="p-3", the same way an app would.
  • A new example shows the month and year dropdowns, and the presets example now highlights the active preset.
  • The docs site's prose table styles no longer apply inside demos, where they made DatePicker's weekday row bold. Tables in other demos, like the Popover and Table examples, now use their own header styles too. This is in its own commit.

Testing

  • Unit tests: 1513/1513 pass, including new tests for padding and the single, range and today states.
  • Browser tests for DatePicker and Popover: 32/32 pass. One existing assertion now checks the range endpoint fill on the day button, where it lives now.
  • tsc, vp lint and vp fmt --check are clean.
  • Checked on the docs site in light and dark mode: single, multiple, range, presets, disabled dates with a footer, dropdowns, keyboard focus, and month navigation with and without reduced motion.

  • Reviews
    • bonk has reviewed the change
    • automated review not possible because: this PR is opened from a fork, and the bonk review workflow only runs on same-repo PRs
  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:

The `.kumo-prose` table rules also applied inside `.not-prose` demos, so
the DatePicker weekday row rendered bold in its inline examples. Skip
`.not-prose` like the neighboring prose rules do, and give PropsTable its
header color directly so it looks the same.
Style DatePicker with Kumo token classes on each react-day-picker part
instead of the hard-coded `.rdp-*` block in kumo.css, so it follows the
active theme and kumo-standalone.css styles it too. The month-change
animations move to kumo-binding.css so both stylesheets ship them, and
they respect prefers-reduced-motion.

- Days are 32px squares in 36px columns with 8px between weeks and 14px
  text. The previous and next buttons are borderless squares that stay
  grouped at the end of the header.
- Two-month views sit side by side, and range bands are rounded at their
  ends and where weeks wrap.
- Style month and year dropdowns, and flip the arrows in RTL.
- Keep the component free of internal padding. The inline docs examples
  set it with `className="p-3"`, and Popover examples keep `p-3`.
- Docs: add a month and year dropdown example, and fix the presets
  example's active highlight.
@clanky-the-clanker

Copy link
Copy Markdown

This pull request was not reviewed automatically because its author does not have write access to this repository. A maintainer with write access can start a review by commenting clanky review (or clanker review or @clanky-the-clanker review), optionally followed by instructions (e.g. clanky review focus on the retry logic).

@pkg-pr-new

pkg-pr-new Bot commented Oct 28, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/kumo@900

commit: b12cce8

@github-actions

Copy link
Copy Markdown
Contributor

Visual contracts

Linux Chromium references exercised by the PR's visual-contracts job.

1 curated contract

truncating text trigger

truncating text trigger

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.

1 participant