Tencent / Tencent/tdesign-react
[DatePicker] 期望valueType属性支持更多日期格式,比如MM/DD/YYYY,最好支持所有dayjs支持的格式。
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 965
- Forks
- 373
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
这个功能解决了什么问题
某些项目中的日期格式,有时使用MM/DD/YYYY格式,可能用于js代码中,也可能用于跟API传参。
目前valueType属性不支持此类型,需要来回转换,很繁琐。
你建议的方案是什么
1) 期望valueType属性支持更多日期格式,比如MM/DD/YYYY,最好支持所有dayjs支持的格式。
2)期望全局设置中支持设置valueType属性。
3)期望DatePicker的其它日期相关的属性,比如disableDate属性的from,to,before,after也使用 valueType属性设置。
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 DatePicker valueType handling and inspect how date values are formatted and parsed with dayjs. Then review the global settings and disableDate's from, to, before, and after options described in the issue. Done means supporting formats such as MM/DD/YYYY, ideally all dayjs formats, with consistent valueType behavior across those settings and properties.
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
- 38/100