QField icon indicating copy to clipboard operation
QField copied to clipboard

Bug with the date widget in text mode (calendar unchecked).

Open zzzef opened this issue 1 year ago • 6 comments

Date widget substract 1 day in text mode (calendar unchecked).

Just a date field with a drag and drop form with date widget in text mode (calendar unchecked).

  • With date format yyyy-MM-dd and default for display, everything OK in QGIS, but Qfield substract 1 day after validation. 2023-03-23 become 2023-03-22. Ok if we use the calendar widget.

  • With date format yyyy-MM-dd and dd-MM-yyyy for display, it seems that sometimes Qfield substract 1 year sometimes not. And with QGIS that's OK, but Qfield, don't show the mask ' - - ', we have to type '-', and it show '(no date)'.

  • QGIS 3.22.16 on Windows

  • OS: Android 10 on Mi Mix 2s

  • QField version: 2.7.1

Tested with date field in a Spatialite db. That was OK with olders Qfield versions (2.5 for example).

Example join. dates.zip

zzzef avatar Mar 24 '23 14:03 zzzef

@zzzef , has this been fixed using latest QField 3.2.0? The date time widget has received quite a few bug fixes that could have resolved this.

nirvn avatar Mar 22 '24 05:03 nirvn

@nirvn , no same issue. 2023-03-22 becomes 2023-03-21.

zzzef avatar Mar 22 '24 08:03 zzzef

Out of curiosity, which timezone are you based in?

suricactus avatar Mar 22 '24 10:03 suricactus

UTC+1

zzzef avatar Mar 22 '24 12:03 zzzef

Another information. When the last character of a date is set, anytime you press any key (except delete and return), the date is reduced by 1 day. I haven't tested with another keyboard than Google keyboard.

With an impossible date, the day don't change, so that's the validation process when we tap the last character. If I choose the button for today's date, that's OK, but if tap on the keyboard, then day -1.

zzzef avatar Mar 25 '24 23:03 zzzef

Still hapenning in current version (QField version: 3.3.6).

Scintsz avatar Jul 19 '24 17:07 Scintsz