react-component / react-component/picker
Multiple "format" has been broken for us in new v4 version
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 304
- Forks
- 345
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 7
Description
Use-case we have is more smart formatting with autocomplete, like if you enter 06 - it will assume that it is the 6th of current month of current year. But, and it is important, it were not trigger onChange (or, I assume it were, but didn't autocomplete the input until user explicitly trigger onChange by moving to other field, for example), so user could still add more to that, like 06.05, which would assume it is 5th month of current year.
To make it work we used format list like so
'DD.MM.YYYY', 'DD.M.YYYY', 'D.MM.YYYY', 'D.M.YYYY', 'DD.MM.YY', 'DD.M.YY', 'D.M.YY',
'DD.MM', 'DD.M', 'D.M', 'DDMMYYYY', 'DDMMYY', 'DDMM', 'DD', 'D'
In the 3.4.7 -> v4 (like antd 5.13.3 -> 5.14.0) refactoring this approach does not work anymore, now it triggers onChange on any format match, like you enter 06 - it completes input with 06/02/2025, and user can't adjust it anymore.
As an additional feature request, I'd probably appreciate formatter/parser functionality with methods, like it is on InputNumber component to make it more stable.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the format-list behavior described for the picker across the 3.4.7 to v4 transition, using inputs such as 06 and 06.05. Trace the format matching and onChange behavior; done means partial input remains editable while complete matches still autocomplete as intended, with coverage for the listed formats.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100