Tencent / Tencent/tdesign-react
【DateRangePicker】支持弹出下拉框左右开始日期和结束日期自定义
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 965
- Forks
- 373
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
这个功能解决了什么问题
比如现在是2024-11=05,设置disableDate.after为dayjs().format(),那么弹出框的左边显示2020年11月5日,左边日期选择器11月5日和右边日期选择器12月的所有日期都是不可选的。
我的需求是:现有功能可能会导致不可选的无效范围过大,我希望弹出框左右日期是可以配置的,上面的情况下,如果左边显示2024年10月,右边显示2024年11月,会更加合理。
你建议的方案是什么?
弹出框左右日期是可以配置的,而不是像现在固定左边显示当前月,右边显示当前月 1。我的需求场景下,希望左边显示当前月-1,右边显示当前月。
Contributor guide
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
Start at the DateRangePicker component entry point and inspect how it currently derives the left and right displayed months, along with the date-disabling behavior described in the issue. Define the configuration semantics with existing component API patterns, then verify that a previous-month/current-month display avoids the overly broad disabled range and is covered by appropriate tests.
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