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

[TimeRangePicker] disableTime 支持数组 #4128

Open
waney opened this issue Apr 19, 2024 · 3 comments
Open

[TimeRangePicker] disableTime 支持数组 #4128

waney opened this issue Apr 19, 2024 · 3 comments
Labels
💪🏻 enhancement New feature or request

Comments

@waney
Copy link

waney commented Apr 19, 2024

tdesign-vue-next 版本

1.9.4

重现链接

No response

重现步骤

ff6b09431631856a63536fd088ca78e
d9f49b690a3faa5aca5ac1e7d9bf08f

const disableTime: TimeRangePickerProps['disableTime'] = (h) => {
  const disableHour = [1, 2, 3];
  if (h > 4) {
    return {
      hour: disableHour,
      minute: [30, 31, 32, 33, 34],
    };
  }
  return {
    hour: disableHour,
  };
};

image

期望结果

这里的第一个和第二个值要使用不同的disableTime,多数时候是用来选择时间范围,第二个时间不会小于第1个

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

👋 @waney,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@waney waney changed the title [TimeRangePicker] disableTime无效 [TimeRangePicker] disableTime 不能正确使用 Apr 19, 2024
@RayJason
Copy link
Contributor

考虑对 TimeRangePicker 的 disableTime 支持数组
image

@RayJason
Copy link
Contributor

另外,如果 format 的格式和默认值格式不一致时,会导致无法修改值。
如:format="HH:mm",默认值为 ['09:00', '23:00']
image

@uyarn uyarn added the 💪🏻 enhancement New feature or request label Apr 22, 2024
@uyarn uyarn changed the title [TimeRangePicker] disableTime 不能正确使用 [TimeRangePicker] disableTime 支持数组 Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪🏻 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants