Need help with date picker issue

Hi there,

I’ve built an app with a date picker as part of a form, basically for users to indicate their date of birth.

I’ve gotten some feedback from various users of the app that the date picker does not seem to be working properly for them. The most common issue is that they’ll select a date on the pop-up calendar, but after pressing “OK”, what’s reflected on the field of the form is a day off what they’ve selected on the calendar.

For example, someone encountering this issue may pick 10 June 2021 on the pop-up calendar, but after selecting the date it will reflect as 9 June 2021 on the field of the form.

Strangely after submitting the form, the correct date is then reflected for some, but not for others. And this problem only happens for certain users, not all. The frustrating thing is that it works perfectly fine for me so I can’t replicate the issue on my end. So I am relying on a lot of trial and error and feedback to fix the issue.

I’m also wondering if this is a timezone issue. I’m from Singapore (GMT +8) and I’ve made sure the Google Spreadsheet is in the correct timezone, but I’m just wondering if it is because the calendar is based off a different timezone and is trying to adjust and compensate for the difference, therefore the issue. But it’s just a suspicion.

Any suggestions on how to fix the issue? Would really appreciate any help. Thanks in advance!

1 Like

Hi @Samuel_Lee ,

Welcome to the forum. I’m new here as well so can’t give you exact answer but another member with a great app is @Mark_Turrell who brought up a somewhat similar question regarding dates/times during the recent open coding office hours this past Thursday. Perhaps he may have more perspective on this.

Good luck

Hi, welcome to the forum.

I don’t know this issue, but I identified that they are many posts about Date Picker (I filtered on the post since Jan-2021).

https://community.glideapps.com/search?q=date%20picker%20before:2021-01-01%20in:title

By the way, this is clearly a good practice to start by looking for similar issues in the Forum: it enables you

  • not only (often) to solve your issue
  • but also to find other ideas/practices around the topic that you are looking
    Therefore save time & learn quicker.

Good luck!

I’ve had that reported to me as bugs in my app but I haven’t put the time in to track down whether it’s true, and if so, what the issue is.

The biggest issue I had with date of birth was the user not seeing the year. I shared some CSS about how to change the component to make it more obvious to the user, and my implementation now works fine (with no day-switching problem reported for a week or so).

M

Welcome, nice to see another Singapore-based Glide user :slight_smile:

Interesting issue. I’ve not encountered this one myself. On face value it does seem that it might be timezone related, but I’d be a bit skeptical about that. As far as I’m aware, Glide will always use the device local time (which itself brings a whole host of challenges - but that’s a different story), and never makes any attempt to adjust for timezone.

Have you tried testing to see if you can replicate the issue yourself?

If you can come up with a series of steps required to “make it happen”, then we can report it to Glide as a bug (assuming that it is) and bang our fists on the table until they fix it :wink:

Thanks! I’ve tried my luck looking around but couldn’t find any similar issue yet. I’ll keep looking!

Hey Mark,

Thanks, I’ll check it out! Did you also encounter the day-switching issue?

Hey Darren!

Yeah I tried testing it to replicate it myself but it always works perfectly fine on my devices but doesn’t on random people’s devices.

To make matters more complicated, some people face the issue at first, then it goes away on its own later on and they never face that issue again. So I’ve already had some issues just trying to chase the issue… Haha…

2 Likes

I know the feeling!!

Definitely not the first report of this issue.

Is this being fixed, Glide team? I have user complaints - it means their certificates for corona tests are wrong and might be disallowed because the date is off by one date (how can this even be?) - I will suggest this for Tues @Mark

Just a shot in the dark, but is it possible that anybody with this problem maybe has the time set manually to override the network set time, but still has the timezones set, possibly to the wrong timezone. Or possibly they have disabled any form of daylight savings time?

Based on what I have learned and observed with how Glide works with dates, you can attach a timezone or offset to a date and normally you should be able to do some math to find the difference between your local time and Universal/Greenwich time, so glide does have the ability to be aware of your local time/timezone, but I wonder if things could get messed up if the device time didn’t match the expected time for the timezone.

I think I’ve mostly seen this reported with apple devices, but I can see on my Android that it is possible to override the time while keeping the same timezone.

In the case of my users, I am comfortable thinking there is zero chance anyone would have done that. Think a couple in their fifties needing a corona test to have dinner in a pizza restaurant at a sea side resort :slight_smile:

1 Like

I’ve seen people accidentally get into the accessibility settings and change the color correction setting on their phone and set it for those with Deuteranomaly. Plus I think inverse colors got turned on. Took me a little bit to figure that one out and fix it. The pictures and colors looked horrid.

I messed up a phone once because I was in developer settings and turned on RTL mode. Put the phone into an endless error loop and I had to factory reset and lose all of my data.

Point being, experienced or not, they may not intentionally be adjusting settings on their phone, or just messing around, or they are still used to the old way of pulling the clock off the wall to set the time manually instead of letting it happen automatically.

Who knows. I’d be curious to see the phone’s time settings from a user that has this issue.

3 Likes