Skip to content

Conversation

@ArcPen
Copy link

@ArcPen ArcPen commented Aug 29, 2025

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

fix #5939

💡 需求背景和解决方案

📝 更新日志

  • fix(time-picker): 在validateInputValue中加入对禁止时间的判定

  • 本条 PR 不需要纳入 Changelog

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

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

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

@tdesign-bot
Copy link
Collaborator

tdesign-bot commented Aug 30, 2025

TDesign Component Repositories CI Test Open

Component Lint Test Build Preview
tdesign-vue 👀
tdesign-vue-next 👀
tdesign-react 👀
tdesign-web-components
tdesign-mobile-vue
tdesign-mobile-react 👀

export function validateInputValue(
value: string,
format: string,
disableTime?: (...params: any) => any
Copy link
Collaborator

Choose a reason for hiding this comment

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

返回值不应该定义为any?
这个方法有具体的返回类型吧

Copy link
Author

Choose a reason for hiding this comment

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

下面这种写法可以吗,可以的话我commit一下

export function validateInputValue(
  value: string,
  format: string,
  disableTime?: (...params: any) => { [key in EPickerCols]?: number[]; } | null
) { ...

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

Choose a reason for hiding this comment

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

不对哦,直接复制过来吧😂

Copy link
Author

Choose a reason for hiding this comment

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

好的,已修改

@Tencent Tencent deleted a comment from ArcPen Sep 2, 2025
s: number,
ms: number,
context: { partial: 'start' | 'end' },
) => Partial<{ hour: Array<number>; minute: Array<number>; second: Array<number> }>
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个函数是timePicker和timeRangePicker共用的,所以需要考虑到毫秒的情况

Copy link
Author

Choose a reason for hiding this comment

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

已加入

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.

[TimePicker] 禁用时间,没有限制“此刻”的情况

3 participants