ant-design-vue
ant-design-vue copied to clipboard
a-date-picker使用valueFormat属性后使用disabled-date第一次失效
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
undefined
Environment
vue版本
Reproduction link
https://gitee.com/libinpeng/ant.git
Steps to reproduce
先选择第一个日期,看第二个日期的禁选日期,选第二个日期的时候会发现禁选日期又一次改变了
What is expected?
我希望第二个时间的禁选日期根据第一个时间改变而改变
What is actually happening?
初始时第一个时间改变时第二个禁选日期有问题,当我第一次进来时选择第一个时间为2024-02-15,第二个时间应该是只能选2024-02-17以及以后的日期,但是还是可以选2024-02-16且选完之后那个日期被禁选了
尝试把valueFormat改为"YYYY-MM-DD 00:00:00"
尝试将 valueFormat 改为“YYYY-MM-DD 00:00:00”
感谢,确实能够成功实现,但是还有其他方法吗?因为我想要的格式的YYYY-MM-DD
尝试将 valueFormat 改为“YYYY-MM-DD 00:00:00”
我看你的回答,猜测antd比较的方法,发现我将前后比较的格式统一就可以实现,于是我将比较的参数都改为YYYY-MM-DD的时间戳 let currentDate = new Date(flightInfoForm.value.expectedArrival); currentDate = currentDate.setDate(currentDate.getDate() + 1); const newCurrent = dayjs(current.format('YYYY-MM-DD')).valueOf(); return newCurrent && newCurrent < currentDate;
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days