Skip to content

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

@loushengyue

Description

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

What problem does this feature solve?

日期范围选择器
组件:
复现步骤:
1.从startDate的input输入框点击进入
2.选择startDate
3.当准被选择startDate更小的日期作为另一个“endDate”时,无法选择比startDate小的范围
期望效果:可以选择比startDate小的日期作为“endDate”,然后自动交换2个日期,类似antD的dateRange效果。

What does the proposed API look like?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions