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

Bad behavior on allowclear inside Form.Item - DatePicker #46144

Closed
99Arrzel opened this issue Nov 28, 2023 · 5 comments
Closed

Bad behavior on allowclear inside Form.Item - DatePicker #46144

99Arrzel opened this issue Nov 28, 2023 · 5 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@99Arrzel
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Just click on the "x" clear, the state of the component DatePicker goes to "Invalid Date"

What is expected?

Just clear the date.

What is actually happening?

Bugging date with invalid date and full of nan calendar

Environment Info
antd 5.11.5
React 18.2.0
System Ubuntu 22.04 LTS
Browser Brave Browser

Should be something easy to fix.
Checking the onchange, the value is set to null, when it should be set to undefined.

@MadCcc MadCcc added 🐛 Bug Ant Design Team had proved that this is a bug. and removed unconfirmed labels Nov 29, 2023
@MadCcc
Copy link
Member

MadCcc commented Nov 29, 2023

@MadCcc MadCcc closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@afc163
Copy link
Member

afc163 commented Nov 29, 2023

@MadCcc Still broken in your codesandbox.

@99Arrzel
Copy link
Author

@MadCcc Can't see any changes, still broken

@mauricin317
Copy link

Just remove getValueProps from the Form.Item.

@zoobot
Copy link

zoobot commented May 18, 2024

I am having this too. Any plan to fix this?
All the other form items get set to undefined when cleared, why's this one different?
We need it undefined to differentiate when we send null on purpose. Thanks!

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

5 participants