Error on datetime field on scaffold

Hi there,
I’m trying to generate scaffolding on a simple database configuration.

The database schema has a single datamodel “Task”:

Task {
id Int @id @default(autoincrement())
name String
description String?
points Int
bonus Int?
assignee String
dueDate DateTime?

After running “yarn rw prisma migrate dev” and then “yarn rw g scaffold task” everything seems to be ok, but trying to add a new task (by “new task” button) I’ve faced out the following error:

I’ve tried to remove the optional option (the question mark) from date field, but no change was made to result.

We’ve got an issue open for this one: v0.27 DateField error · Issue #1995 · redwoodjs/redwood · GitHub

Sorry about that! It should be fixed in the next release!

Hi @rob thanks for reply.
I’m sorry. I hadn’t noticed the issue.
Great, I’m waiting for next release :slight_smile:

1 Like

PR opened: Fixes formatDateTime helper when field is optional and value is empty by cannikin · Pull Request #2072 · redwoodjs/redwood · GitHub

1 Like