Skip to content

Prisma generated date type / Next.js and dates #4428

Answered by ryands17
marceloverdijk asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @marceloverdijk 👋

You're most probable facing an issue that Next.js has where it doesn't serialize the Date type.

I would suggest reading the below discussions/issues and the workaround is to stringify the date first and then set them in props.

vercel/next.js#11993
vercel/next.js#11498

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
10 replies
@marceloverdijk
Comment options

@ryands17
Comment options

@marceloverdijk
Comment options

@slugmandrew
Comment options

@alex-zwingli
Comment options

Answer selected by marceloverdijk
Comment options

You must be logged in to vote
1 reply
@Talor-A
Comment options

Comment options

You must be logged in to vote
3 replies
@bradgreens
Comment options

@im-paul-mak33
Comment options

@im-paul-mak33
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
10 participants