react-google-forms-hooks
react-google-forms-hooks copied to clipboard
Add date and time support client-side
Since these two fields are basically represented as strings and act exactly like short and long answer, this is a pretty safe and trivial addition.
Tests are passing, and tested manually to see the whole submit flow, everything works as expected.
Hey, @francisconeves97, sorry for the ping, but was wondering if this is something that you could take a quick look at. I'm sort of on a deadline, and I'd be nice if this was available in the package
Hey @DanielOrtel! I am sorry for taking so long to look into this, past couple of weeks have been very busy for me :/ I will try to check it asap as soon as I can. I am sorry for the impact on your project
Are their format the same? Would it make sense to add some validation regarding the date format? I will have to take a deeper look into how google forms handles these type of inputs
From what I could test, the DATE and TIME fields are exactly the same as the SHORT_ANSWER input in every way. Google does not validate the format on the backend, it merely presents a date-picker/time-picker component on the client side when it sees the Date/Time formats, but programatically, it will accept any string, including foo in the response.
also, sorry about not being up-to-date on this, we've opted to drop the date field, and just use a text field for that, since we had to release a week ago, so this was no longer that high priority. But I'll try to address the concerns you raised shortly. It would still be useful to have