mobile icon indicating copy to clipboard operation
mobile copied to clipboard

I can't select the current date

Open mibalas opened this issue 4 years ago • 5 comments

Hi, I don't know why but now I can't select the current date in date type field in the Input.

When I click on the calendar in the form, the date of the previous day appears.

And if I open the calendar and select today's date it doesn't change.

To show today's date i have to select tomorrow's date.

In QGIS project the date appears correctly.

what's happening? a few days ago it was ok

I'm using qgis 3.10 / Input 1.0.1

Thank you

mibalas avatar Sep 30 '21 20:09 mibalas

hi @mibalas just wondering, what is your timezone and at what time of the day it didn't work. Is it possible that e.g. it works in the morning but not in the evening?

Also, how do you select the current date - by clicking the icon on the right side or by opening the calendar dialog and then picking date there?

What if you use date/time instead of just date - does it misbehave the same way?

We have not done any changes to the date/time form widget recently, so I am surprised it was working few days ago but not now.

wonder-sk avatar Oct 01 '21 09:10 wonder-sk

Hi, @wonder-sk

hi @mibalas just wondering, what is your timezone and at what time of the day it didn't work. Is it possible that e.g. it works in the morning but not in the evening?

I'm in the GMT -3 timezone, what doesn't work is the date I tested in the morning and night and the same error happens

Also, how do you select the current date - by clicking the icon on the right side or by opening the calendar dialog and then picking date there?

I tried it both ways and the same error happens

What if you use date/time instead of just date - does it misbehave the same way?

Apparently it's the field type, I created a new field with type datetime and it's normal, works well

I also noticed that the wrong date appears in the input form but if I save the point, synchronize and open the .gpkg in qgis the date is correct in the table.

mibalas avatar Oct 01 '21 13:10 mibalas

Thanks for follow up. Could you please share the project with me (my Mergin username is martin) so that I can try it?

wonder-sk avatar Oct 01 '21 15:10 wonder-sk

Notes from user:

My timezone is Eastern Standard Time (GMT-5). The project is just the default "Create project" with the 3 default fields. While the calendar picked selects the previous day, tapping on the calendar icon without opening the picker does select the correct date/time for my timezone.

UPDATE: I changed my device timezone to GMT and the calendar picker works as expected. You should be able to replicate this issue by changing your device timezone.

tomasMizera avatar Mar 01 '22 15:03 tomasMizera

Any updates on this? It's kind of a nasty bug that makes it easy to collect incorrect values. I would note that I'm experiencing this on Android, not sure if it's also happening on iOS.

bmcbride avatar Mar 31 '22 14:03 bmcbride

This is direct side effect of upstream change between Qt 5.10.x and all following version we use. For reference https://bugreports.qt.io/browse/QTBUG-72208?jql=text%20~%20%22MonthGrid%22

PeterPetrik avatar Oct 04 '23 10:10 PeterPetrik