I'm using @sanity/rich-date-input plugin in my project, and I've followed the docs properly for adding the plugin to the project. However, when I run sanity-codegen script, I get TypeError: Cannot convert object to primitive value error. Is there a way for me to either exclude richDate type generation while running sanity-codegen or just make it work by not throwing any error while running sanity-codegen script?
Any help will be greatly appreciated.
Thanks!
Screenshot of the error:
!
How I'm using richDate in my schema:
{ title: "Date & Time", description: "When do you want to start/end the timer", name: "timer", type: "richDate", options: { inputDate: true, inputTime: true, dateFormat: 'YY-MM-DD z', timeFormat: 'hh:mm a', timeStep: 15, }, validation: Rule => Rule.required(), },
I'm using @sanity/rich-date-input plugin in my project, and I've followed the docs properly for adding the plugin to the project. However, when I run sanity-codegen script, I get
TypeError: Cannot convert object to primitive value
error. Is there a way for me to either excluderichDate
type generation while running sanity-codegen or just make it work by not throwing any error while running sanity-codegen script?Any help will be greatly appreciated.
Thanks!
Screenshot of the error: !
How I'm using
richDate
in my schema:{ title: "Date & Time", description: "When do you want to start/end the timer", name: "timer", type: "richDate", options: { inputDate: true, inputTime: true, dateFormat: 'YY-MM-DD z', timeFormat: 'hh:mm a', timeStep: 15, }, validation: Rule => Rule.required(), },