Skip to content

fix(date-picker): hide outside dates in multi-month views - #831

Open
geoquant wants to merge 3 commits into
cloudflare:mainfrom
geoquant:jonnie/date-range-outside-month-selection
Open

geoquant wants to merge 3 commits into
cloudflare:mainfrom
geoquant:jonnie/date-range-outside-month-selection

Conversation

@geoquant

@geoquant geoquant commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Hide dates outside each calendar panel's month by default in multi-month DatePicker views, so dates and selected ranges are not duplicated between panels.

  • Replace the directional primary/secondary highlights with hidden outside-month dates.
  • Remove the range-origin state, custom day wrapper, and secondary-color CSS.
  • Preserve existing single-month behavior and explicit showOutsideDays overrides.
  • Keep cross-month range selection, keyboard navigation, and disabled-date behavior intact.
  • Update the documentation, patch changeset, and browser regression tests.

Validation

  • 30 date-picker browser tests pass, covering Kumo and FedRAMP in light/dark modes, selected-date visibility, forward/backward range selection, min constraints, uncontrolled keyboard selection and focus, navigation, disabled dates, all three selection modes, and explicit outside-day overrides.
  • Library typecheck and lint pass.
  • 1,407 unit tests and changed-file formatting checks passed for this implementation before it was stashed; browser tests, typecheck, and lint were rerun after restoring it.

  • Reviews
    • bonk has reviewed the change
    • automated review not possible because: No automated code reviewer was invoked in this local session; the restored diff was inspected and validated locally.
  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:

@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026 •

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

commit: c849c2c

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Docs Preview

View docs preview

Commit: c849c2c

@github-actions

github-actions Bot commented Sep 30, 2026 •

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

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📐 Bundle Size

Consumer fixtures bundled against packages/kumo/dist (peers external, minified ESM).

Fixture Raw Gzip Brotli
Button (root) 166.3 KB 50.9 KB 44.1 KB
Button (components/button) 166.2 KB 50.9 KB 44.1 KB
Button + Dialog + Select (root) 291.1 KB 86.8 KB 72.9 KB
Button + Dialog + Select (component subpaths) 291.1 KB 86.8 KB 72.8 KB
Chart (root) 238.6 KB 72.0 KB 61.8 KB
Chart (components/chart) 238.6 KB 72.0 KB 61.9 KB
Badge (components/badge) 36.5 KB 12.7 KB 11.1 KB
Flow (components/flow) 200.6 KB 59.2 KB 51.7 KB
Button (primitives/button) 12.2 KB 4.4 KB 3.9 KB
Primitives barrel 635.8 KB 176.8 KB 139.3 KB
Code highlighting (code) 2.07 MB 469.2 KB 350.4 KB

npm tarball: 546 files, 1.50 MB packed, 6.94 MB unpacked.

⚠️ 24 flagged files in tarball (tests / raw scripts)
  • dist/blocks-source/delete-resource/delete-resource.test.tsx
  • dist/blocks-source/resource-list/resource-list.test.tsx
  • scripts/component-registry/cache.ts
  • scripts/component-registry/discovery.ts
  • scripts/component-registry/example-cleanup.ts
  • scripts/component-registry/index.test.ts
  • scripts/component-registry/index.ts
  • scripts/component-registry/markdown-generator.ts
  • scripts/component-registry/metadata.ts
  • scripts/component-registry/props-filter.ts
  • scripts/component-registry/schema-generator.ts
  • scripts/component-registry/sub-components.ts
  • scripts/component-registry/types.ts
  • scripts/component-registry/utils.ts
  • scripts/component-registry/variant-parser.ts
  • scripts/css-build.ts
  • scripts/generate-globe-land-mask.mjs
  • scripts/generate-primitives.ts
  • scripts/theme-generator/config.ts
  • scripts/theme-generator/generate-css.test.ts
  • scripts/theme-generator/generate-css.ts
  • scripts/theme-generator/index.ts
  • scripts/theme-generator/migrate.ts
  • scripts/theme-generator/types.ts

Report-only: no size thresholds are enforced yet.

Commit: c849c2ca

Track the panel used to start a range so completing it in another panel does not move primary emphasis. Fall back to in-month emphasis for external presets and when the origin month is no longer visible.
@geoquant geoquant changed the title fix(date-picker): soften outside-month range highlights fix(date-picker): de-emphasize mirrored range selections Oct 1, 2026
@geoquant geoquant changed the title fix(date-picker): de-emphasize mirrored range selections fix(date-picker): hide outside dates in multi-month views Oct 3, 2026
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