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

🐛 [Bug]: Calendar 组件在 range 模式且设置maxDate下无法选中maxDate的那天 #758

Open
1 of 2 tasks
mclryan opened this issue Jan 23, 2025 · 2 comments
Open
1 of 2 tasks

Comments

@mclryan
Copy link

mclryan commented Jan 23, 2025

Which React Vant packages are impacted?

  • react-vant (React Vant core)
  • react-vant-icons(React Vant Icon)

What version of React Vant are you using?

3.3.5

Reproduce live demo(codesandebox or stackblitz)?

No response

Descripition

复现步骤

  1. 设置 Calendar 组件为 range 模式
  2. 启用 allowSameDay
  3. 设置maxDate
  4. value设置maxDate那天作为开始和结束日期
  5. 组件显示的状态并不是选中在同一天,期望选中同一天,只有在value为maxDate那天的时候才会复现,其他是正常的

最小复现代码

<Calendar
type="range"
allowSameDay
showConfirm={false}
poppable={false}
minDate={new Date(2024,1,1)}
maxDate={new Date(2025,0,2)}
value={[new Date(2025,0,2), new Date(2025,0,2)]}
/>

@mclryan
Copy link
Author

mclryan commented Jan 23, 2025

比较紧急,望尽快修复下

1 similar comment
@mclryan
Copy link
Author

mclryan commented Jan 23, 2025

比较紧急,望尽快修复下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant