Can't edit datetime column in drizzle studio "Error: value.toISOString is not a function"
So I'm seeing my database with some data, and for the two
And then when I save as a JS Date and go into Drizzle Studio and try to edit it (even changing a single hour or minute) I get this error when I try and save:
And here's an example value of what is saved in the column
Using PlanetScale as a DB, project started with
from my package.json
schema file (excerpt of bookings table)
When I hover over
However, when I try and save this in any way other than a javascript date (either
I'm very confused here, from what I've read online I should be able to store ISO inside of datetime?
datetime fields I've had a strange issue where I can ONLY submit as a javascript date object, even though in the schema it shows multiple options.And then when I save as a JS Date and go into Drizzle Studio and try to edit it (even changing a single hour or minute) I get this error when I try and save:
And here's an example value of what is saved in the column
2024-02-07T08:17:36.000ZUsing PlanetScale as a DB, project started with
create-t3-app 2 weeks agofrom my package.json
"drizzle-orm": "^0.29.3","drizzle-kit": "^0.20.9",schema file (excerpt of bookings table)
When I hover over
datetime I seeHowever, when I try and save this in any way other than a javascript date (either
new Date() or using luxon .toJSDate()) I get an error in my db insert values, here's where I've tried to return them as .toISO with luxon for example. For some reason the error shows under the id key and it took me a long time to debug that it was related to the startTime and endTime values.I'm very confused here, from what I've read online I should be able to store ISO inside of datetime?