Hello
I trying to build a form that has a datetime field so users can easily select a day and a time for events. I love the redwood forms so I was trying to use that for this feature. I found that if I set a prop of type="datetime-local"
the browser will render a datetime-local date picker! awesome!
however, when I submit my form I get an error:
Expected type DateTime. DateTime cannot represent an invalid date-time-string 2020-04-23T19:00.
if I set this field back to standard text input and just type in the date in ISO format with seconds and a time zone then I don’t have an error. ex: 2020-04-23T19:00:00.000Z
Any ideas on how I can get this form to submit in the right format? I’m trying to figure out if I can use something like .toISOString()
before the form is submitted, but maybe I’m barking up the wrong tree with that.