keystone
keystone copied to clipboard
Cannot set `timestamp` fields to null in Keystone admin panel
Repro Steps
- create a model with a
timestampfield (no options passed) - go to admin panel and navigate to that model
- create one item and set some value for
timestampfield - remove the timestamp value
- hit the update button but throws an error saying that "[field x] requires a date to be selected"
Should be able to update and set null value for timestamp fields.
Also need to mention that this happens only on keystone panel and not the GraphQL.
I've tried { validation: { isRequired: false } } but didn't work neither.
We might have the same issue for calendarDay field as well.
Google Chrome: Version 118.0.5993.117 (Official Build) (64-bit) Nodejs: v18.18.2
Package.json deps:
{
"dependencies": {
"@apollo/server-plugin-landing-page-graphql-playground": "^4.0.1",
"@k6-contrib/list-plugins": "^5.1.0",
"@keystone-6/auth": "^7.0.2",
"@keystone-6/core": "^5.7.0",
"@keystone-6/fields-document": "^8.0.2",
"compression": "^1.7.4",
"fast-jwt": "^3.3.1",
"http-errors": "^2.0.0",
"typescript": "^5.2.2"
},
"engines": {
"node": "^18.18 || ^20.9"
}
}
Here's a screenshot of the error message:
I am trying to remove startDate and it's not required on the code.