-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
good first issueGood for newcomersGood for newcomersissue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:strapiSource is core/strapi packageSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Describe the bug
I want to clear the date that was set on a field
Steps to reproduce the behavior
- Create a type with a date field that is not required
- Create an instance of the type with a value in the date field and save it
- Edit the instance and clear the date field
- It cannot be cleared
- Make a GraphQL request to clear the field
- The request errors
Expected behavior
You can clear the field in the UI
The GraphQL mutation works
Code snippets
mutation UnsetDate($id: ID!) {
updateYourType(input:{
where:{
id: $id
},
data: {
date_field: null
}
}) {
your_type {
id
date_field
}
}
}
This returns "message": "Expected type Date, found \"\"; Date cannot represent an invalid date-string ."
System
- Node.js version: 13.7
- Yarn version: 1.22
- Strapi version: 3b19.5
- Database: Mongo 4.2.5
- Operating system: Arch Linux 4.19-97
Additional context
Add any other context about the problem here.
yrkmann, petnd, DanWebb, 5ika, tofsjonas and 1 more
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersissue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:strapiSource is core/strapi packageSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members