Skip to content

Conversation

@kykim00
Copy link
Contributor

@kykim00 kykim00 commented Nov 27, 2025

Description

Linked issue: #6066

Problem

When using selectsMultiple, the default display format shows:

  • 1 date: 01/01/2024
  • 2 dates: 01/01/2024, 01/15/2024
  • 3+ dates: 01/01/2024 (+2)

Users have no way to customize this format without controlling the value prop directly.

Changes

This PR adds a new formatMultipleDates prop to customize how multiple selected dates are displayed in the input field when using selectsMultiple.

  • src/index.tsx: Implement formatMultipleDates prop in getInputValue method
  • src/test/multiple_selected_dates.test.tsx: Add tests for the new prop
  • src/test/min_time_test.test.tsx: Fix type error caused by discriminated union update
  • docs-site/: Add example for the new prop

Screenshots

image

Allow custom formatting of multiple selected dates in input field.
The formatter receives dates array and a formatDate helper function.

Fixes Hacker0x01#6066
@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.22%. Comparing base (928b2cf) to head (aa0af9d).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6067   +/-   ##
=======================================
  Coverage   99.22%   99.22%           
=======================================
  Files          30       30           
  Lines        3590     3594    +4     
  Branches     1519     1521    +2     
=======================================
+ Hits         3562     3566    +4     
  Misses         27       27           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martijnrusschen martijnrusschen merged commit 134b14e into Hacker0x01:main Nov 27, 2025
6 checks passed
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