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

Cannot set timestamp fields to null in Keystone admin panel #8882

Open
devmor-j opened this issue Oct 31, 2023 · 1 comment
Open

Cannot set timestamp fields to null in Keystone admin panel #8882

devmor-j opened this issue Oct 31, 2023 · 1 comment

Comments

@devmor-j
Copy link

devmor-j commented Oct 31, 2023

Repro Steps

  1. create a model with a timestamp field (no options passed)
  2. go to admin panel and navigate to that model
  3. create one item and set some value for timestamp field
  4. remove the timestamp value
  5. 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"
  }
}
@devmor-j
Copy link
Author

devmor-j commented Nov 1, 2023

Here's a screenshot of the error message:

image

I am trying to remove startDate and it's not required on the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant