Formio date/time picker is returning one day of
I am using Form Io date/time picker but I unchecked the time component so that only the date will save on the database after unchecking the time's checkbox. It still sends the time along with the date in UTC like 2022-10-13T00:00:00+05:00 and while fetching the data from the server it converts it into the viewer's timezone like 2022-10-12T19:00:00.000Z. Payload: 2022-10-13T00:00:00+05:00 Response: 2022-10-12T19:00:00.000Z Formiojs version: 4.14.7
Hey @travist, our team is reporting this issue. Please let us know if this is added to formio dev backlog and if there is a way to track the progress.
@JubayerJoy can you provide a form embed of the issue taking place?
Hey @wag110894, thank you for reaching out and apologies for the delay.
I have requested @usama967 to compose enough information to help you triage this. Our best guess is its happening due to an issue with flat picker date component.
Hey @wag110894, Here is the link to the recorded video you can see the problem. Thanks https://www.loom.com/share/87042493d28a4d41884569f1b5878deb
Thanks for the video, what version of formio.js are you running?
@wag110894 Frontend: formiojs: "4.14.7", Backend: formiojs: "^4.15.0-rc.7",
@usama967: Did you get any response as a fix or at least as a workaround for you problem? I got the same issue here, each date saved through Form IO started to be persisted in DB as a date time since latest versions. We are using angular-formio 4.11.1 version which unfortunately has a non constant dependency on formiojs as described below: "angular-formio": { "version": "4.11.1", [ ...] "requires": { "formiojs": "^4.12.1", [...] }, "dependencies": { "formiojs": { "version": "4.14.10", [...] "requires": { [...] "moment": "^2.29.2", "moment-timezone": "^0.5.34", }, [...] "moment": { "version": "2.29.4", [...] } } },
I think moment 2.29.4 version could be the problem in our case. We didn't reproduce the problem on formiojs "4.14.7" - moment "2.29.3".
Thank you in advance!
@magdacotoarba Unfortunately I didn't get any response. If I use moment = "2.29.3" and formiojs "4.14.7" will it be working fine?
Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!
Should be fixed and not closed, this is definitely still relevant.
Are you able to reproduce this in the latest versions of the app? If so, can you provide an embed URL that our team can use to reproduce it?
We are in the process of updating to the latest version, let's see.
Thank you for your contribution. As this issue has been inactive for over 90 days, I will close it for now. If you wish to reopen the issue, please respond and we can resume the triage process.