-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
fix: cannot clear date-field #17599
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
fix: cannot clear date-field #17599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, I tested it locally.
|
Size Change: -55 B (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
a990b44 to
1415dd4
Compare
|
Added test ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/unable-to-set-date-field-to-null-via-admin-ui/30930/3 |
What does it do?
When a date field is cleared we pass
nullas the onChange value, however we weren't checking this before trying to useformatISO, we now do this. It also fixes a roguemodule.exportsdeclaration we have in the codebase.Why is it needed?
How to test it?
Related issue(s)/PR(s)