Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(date-picker): 修复在指定format和valueType下,年份解析错误问题 #4161

Merged

Conversation

Ericleungs
Copy link
Contributor

@Ericleungs Ericleungs commented Apr 29, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

感觉得需要在文档中说清楚一些,valueType和format,在我的理解里头format用于展示用的,只用于最后将数据展示给用户的时候的格式转换;valueType是用于解析date-picker中的实际的value,用于实际处理计算的。

或许需要重新捋清楚这俩属性的定义以及实际使用,和common库中的formatDate的参数在名称上好像没对齐。

📝 更新日志

  • fix(date-picker): 修复在指定format和valueType下,年份解析错误问题

  • fix(date-picker): 修复解析日期解析错误,导致周显示异常问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Copy link
Contributor

github-actions bot commented Apr 29, 2024

完成

@uyarn
Copy link
Collaborator

uyarn commented Apr 30, 2024

是的valueType和format会造成一些歧义 但是目前暂时只能通过增加更多文档说明解决了
我觉得可以在common那边增加一个统一的解释
image

Copy link
Collaborator

@uyarn uyarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image 头部这里好像还有一些遗漏 BTW 方便的话可以把单日期选择的也处理不

@Ericleungs
Copy link
Contributor Author

image 头部这里好像还有一些遗漏 BTW 方便的话可以把单日期选择的也处理不

好的,我处理一下

@Ericleungs Ericleungs requested a review from uyarn May 18, 2024 11:27
@Ericleungs Ericleungs changed the title 修复在指定format和valueType下,年份解析错误问题 fix(date-picker): 修复在指定format和valueType下,年份解析错误问题 May 18, 2024
@uyarn
Copy link
Collaborator

uyarn commented May 20, 2024

LGTM

@uyarn uyarn merged commit d159c73 into Tencent:develop May 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants