react-component / react-component/picker

Support for pickerValue (similar to defaultPickerValue)

Open
#290 0 comments 7 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

Howdy,

It would be nice if the displayed month could be better controlled to prevent situations like below when using the range picker:

  1. Assume the start and end dates are currently 2021-01-01
  2. Open picker to select start date
  3. Click previous month 12 times
  4. Select 2020-01-01
  5. My code sets defaultPickerValue to [2020-01-01, 2020-01-01]
  6. Panel now "focuses" back to 2021-01-01 for choosing the start date

Now I have click previous month 12 times again to select 2020-01-01 as the end date too

Similar issue was logged in Ant Design: https://github.com/ant-design/ant-design/issues/15360

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 by tracing the range picker behavior described in the issue and compare how defaultPickerValue is handled when selecting the start and end dates. Review the related Ant Design issue for context, then define completion as allowing the displayed month to remain controlled independently of the selected values through the requested pickerValue support.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.