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

Datepicker value doesn't clear with backspace/delete #48748

Open
ofabricioS opened this issue May 2, 2024 · 0 comments
Open

Datepicker value doesn't clear with backspace/delete #48748

ofabricioS opened this issue May 2, 2024 · 0 comments
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@ofabricioS
Copy link

Reproduction link

https://ant.design/components/date-picker

Steps to reproduce

  1. Find a datepicker with some date
  2. Remove the value with backspace and leave the component
  3. The datepicker will have it's value setted to the previous one

What is expected?

It's expected to have the input's value cleared if is the prop allow clear is true. Having it's value reset is frustrating and makes the input confuse. Also, the clear icon isn't accessible with keyboard navigation, worsening the problem in the case of accessibility. My suggestion for that fix may be a this behavior as default or a prop, if necessary.

What is actually happening?

The datepicker have it's value setted to the previous date assigned

Environment Info
antd 5.17.0
React 18.3.1
System Windows 11
Browser Chrome Version 124.0.6367.118 (Official Build) (64-bit)
@MadCcc MadCcc added ⌨️ Accessibility 🐛 Bug Ant Design Team had proved that this is a bug. and removed unconfirmed ⌨️ Accessibility labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants