This appears to be an isolated problem to one user. When selecting a date from the date picker, it is saving the incorrect date (previous day) to the database. I am using a toInsert function. The date picker also doesn’t allow for past dates.
Any ideas on what might be causing this?
It is due to your timezone setting. Please check the time that passed to your database. Btw, the past dates can be enabled in the setting of the date picker element
Thanks for the feedback. I thought about this but don’t understand how a user’s time zone setting would impact the value of the date picker? Surely the date picker selects the date picked?
Hi Certified Code Global, I just was wondering if you had any comments on my previous response?
How would the user’s timezone settings influence the date chose on the date picker?
Wix Data always saves Date objects and displays them in the console with a UTC timezone. See Javascript Date Objects for more information.
This means that if the user’s local time is on the other side of midnight, the local (browser) time and the server time might differ by a day.
Apologies for my ignorance but then how can I ensure the date picked from a date picker is that date, regardless of the user’s local time?
At the moment I am just saving the value of the date picker.
Also having trouble with the date picked when the customer ordered and the date shown on the order in the dashboard being one day apart. Not a time zone issue.