naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

[DateRangePicker] is-date-disabled 里面的value没有与default-time 关联

Open yuzhenqiang opened this issue 2 years ago • 2 comments

TuSimple/naive-ui version (版本)

2.31.0

Vue version (Vue 版本)

3.2.37

Browser and its version (浏览器及其版本)

Chrome/103.0.0.0

System and its version (系统及其版本)

Mac OS 12.4

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/cocky-cloud-y49j61

Reappearance steps (重现步骤)

选择时间范围

Expected results (期望的结果)

当传入 default-time="['00:00:00', '23:59:59']" 时,希望在 is-date-disabled 里,value是按照传入的 default-time 设置默认的时分秒

Actual results (实际的结果)

没有关联默认时间

Remarks (补充说明)

yuzhenqiang avatar Jul 13 '22 13:07 yuzhenqiang

image 因为设置了 default-time 所以时间那里会展示出来,但实际上在 id-date-disabled 里,开始和结束的时间都是 00:00:00

yuzhenqiang avatar Jul 14 '22 02:07 yuzhenqiang

这个感觉并不太符合目前组件的设计,is-date-disabled 只会保证传入一个在当前浏览器时区可以 parse 出合适 date 的时间戳。

日期是否可用不和时间挂钩(按照组件的设计意图,disabled 是个从逐步从大的单位到小的单位确定的过程)。

07akioni avatar Jul 18 '22 18:07 07akioni

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem

jahnli avatar Mar 12 '24 13:03 jahnli