vueComponent/ant-design-vue

RangePicker从startDate进入后选择startDate后,无法选择小于startDate范围的日期,期望恢复这个能力(antd就支持)

Opened this issue · 0 comments

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

vue3.4.21

Reproduction link

https://3x.antdv.com/components/date-picker-cn#components-date-picker-demo-range-picker

Steps to reproduce

日期范围选择器
组件:
复现步骤:
1.从startDate的input输入框点击进入
2.选择startDate
3.当准被选择startDate更小的日期作为另一个“endDate”时,无法选择比startDate小的范围

What is expected?

可以选择比startDate小的日期作为“endDate”,然后自动交换2个日期,类似antD的dateRange效果。

What is actually happening?

关键代码:components/vc-picker/hooks/useRangeDisabled.ts
相关方法:disabledStartDate 、disabledEndDate
待修改部分:将Disabled range 、 Disabled part两部分的逻辑去掉即可,或者暴露配置允许用户自行配置是否开启


hope reopen issue https://github.com/vueComponent/ant-design-vue/issues/7724,and complete this feature