feat: customizable start/end labels for range time input - #6325 - #90
Open
balajis-qb wants to merge 1 commit into
Open
balajis-qb wants to merge 1 commit into
balajis-qb wants to merge 1 commit into
Conversation
When `selectsRange` is combined with `showTimeInput`, the two time inputs had hardcoded "(Start)" / "(End)" suffixes appended to `timeInputLabel`, with no way to override them. Add `timeInputStartLabel` and `timeInputEndLabel` props. When provided, each replaces the corresponding caption entirely; otherwise the existing `"<timeInputLabel> (Start/End)"` behavior is unchanged. Single (non-range) mode is unaffected. Includes a docs-site example and tests covering default behaviour, per-side fallback, and precedence over `timeInputLabel`. Fixes Hacker0x01#6280
balajis-qb
force-pushed
the
feat/6280-range-time-input-labels
branch
from
September 4, 2026 07:03
4cad0b8 to
cc108fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Hacker0x01#6280.
When
selectsRangeis combined withshowTimeInput, the calendar renders two time inputs and hardcodes English(Start)/(End)suffixes ontotimeInputLabel(calendar.tsx), with no way to override or translate them — a gap for non-English apps.This adds two optional props:
timeInputStartLabeltimeInputEndLabelWhen a prop is not set, the existing
"<timeInputLabel> (Start)"/" (End)"behaviour is unchanged. Single (non-range)showTimeInputmode is unaffected.Changes
src/calendar.tsx— declaretimeInputStartLabel/timeInputEndLabelonCalendarProps(they flow toDatePickerPropsautomatically); use them inrenderInputTimeSection.src/test/datepicker_test.test.tsx— 6 tests: default suffixes, back-compat withtimeInputLabel, full-caption replacement, precedence overtimeInputLabel, per-side fallback, single-mode unaffected.docs-site/— new "Input Time with Range (custom start/end labels)" example.Screenshots
Default Mode

Override Lables

Contribution checklist