react-component / react-component/picker

wrong size attribute computation for the Range picker input.

Open
#187 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
304
Forks
345
Avg merge
2d 7h
Merged PRs (30d)
7

Description

When pass date format as "MMMM DD, YYYY" for the range picker, size of the input computed as format.length + 2 which is 15 and its wrong.

Moment formatted date will be December 01, 2020 which should be 17 + 2.

https://github.com/react-component/picker/blob/master/src/utils/uiUtil.ts#L191

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start at src/utils/uiUtil.ts around line 191 and inspect how the range picker input size is derived from the date format. Compare that calculation with the formatted example in the issue; done means the input size accounts for the rendered date length plus the stated padding.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.