System Information
- Strapi Version: 4.12.0
- Operating System: Alpine Linux (Docker container using
node:18-alpine
) - Database: postgresql
- Node Version: v18.17.0
- NPM Version: 9.8.1
- Yarn Version: 1.22.19
Hello Strapi Community,
I am experiencing an issue with the Strapi Admin UI regarding the handling of null values in date fields.
I have a model called banner
which contains two date fields, DateStart
and DateEnd
. Both fields are optional, but when I attempt to clear a previously set date via the UI (using the provided “x” button), the changes aren’t saved. The save button stays disabled after clearing the date, and even after making changes to other fields, the cleared date is not updated in the database.
Here’s the schema for the date fields:
"DateStart": {
"pluginOptions": {
"i18n": {
"localized": false
}
},
"type": "date",
"required": false
},
"DateEnd": {
"pluginOptions": {
"i18n": {
"localized": false
}
},
"type": "date"
},
Steps to reproduce the issue:
- Set a date for either the
DateStart
orDateEnd
field via the Admin UI. - Save the changes.
- Return to the same entity and try to clear the date field using the “x” button next to the date.
- Notice that the “Save” button is not enabled, and the changes aren’t saved.
Expected behavior: Clearing the date field should be a valid action that can be saved.
I would appreciate any insights into how I could resolve this issue. Is this a known issue or is there a workaround I can use?
Thank you