DateTimeRangeInput: let the consumer format how each end is shown

Open Beginner friendly
#151 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Read dateTimeRange.ts, especially formatValue, to see how each end is currently displayed and how the component receives props. Check the DateTimeRangeInput implementation and its usage to identify the simplest consumer-facing formatting option. Done means consumers can choose the display format while the stored value remains YYYY-MM-DDTHH:MM.

Written by the indexing model from the issue text.

Description

Problem

DateTimeRangeInput always shows its ends as YYYY-MM-DD HH:mm (formatValue in dateTimeRange.ts), and a consumer cannot change it. Backend.AI WebUI writes the same window elsewhere on the same card (a reset button's tooltip, an edit-mode caption) in the locale's date and time, dayjs's lll ("Oct 29, 2026 9:30 AM"), so the picker and the text a few pixels away show one window in two formats.

Expected

A way to set how the trigger shows each end, for example a formatValue?: (value: ISODateTimeString, showTime: boolean) => string prop, or locale-aware display through the InternationalizationProvider's locale. The value stays YYYY-MM-DDTHH:MM; only the display changes.

Context

lablup/backend.ai-webui#10915 adopts DateTimeRangeInput (#140, #145) for dashboard card periods and moved its own labels to lll.

Dominant language
TypeScript
Stars
2
Forks
0
Avg merge
17h 58m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lablup/ui-common

All issues in lablup/ui-common

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.