Tencent / Tencent/tdesign-react

[DatePicker] 期望valueType属性支持更多日期格式,比如MM/DD/YYYY,最好支持所有dayjs支持的格式。

Open
#3,445 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💪🏻 enhancement
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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.