Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

TypeError: Cannot convert object to primitive value error for rich-date-input sanity plugin while running sanity-codegen #262

Open
rebisha opened this issue Mar 30, 2022 · 0 comments

Comments

@rebisha
Copy link

rebisha commented Mar 30, 2022

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:
Screen Shot 2022-03-28 at 3 21 52 pm
!

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(), },

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

No branches or pull requests

1 participant