Skip to content

Tabbing to start of custom formatted Date/Time field in attribute form not working #65022

@tombrennan06

Description

@tombrennan06

What is the bug or the crash?

When tabbing to a custom formatted (dd/MM/yyyy) Date/Time field in the attribute form for a new feature, QGIS highlights the first 4 characters ie dd/M, rather than the first two characters. As a result, it is not possible to enter anything while these characters are highlighted.

It is possible (on Windows) to Tab (to MM), and then Shift-Tab (back to dd), to get it to select the days.

However, this is a workaround. It seems like when tabbing from the previous field, it is assumed that the Date/Time field uses the default format (yyyy-MM-dd), where highlighting the first 4 characters would be correct.

The tabbing is correct within the field.

Steps to reproduce the issue

  1. Create a new Temporary Scratch Layer, and add a Text field (eg name) and Date/Time field (eg date)
  2. Go to Layer Properties, and set the Widget Type for the date layer to Date/Time, the display format to Custom (dd/MM/yyyy), and disable the Calendar Popup
  3. Add a new feature
  4. Enter 'test' for the name, and then Tab to the date field
  5. It is not possible to enter anything as 4 characters are highlighted

Versions

QGIS version3.40.15-Bratislava
QGIS code revisionf68f1bf573
 
Libraries
Qt version5.15.13
Python version3.12.12
GDAL version3.12.1 — Chicoutimi
PROJ version9.7.1
EPSG Registry database versionv12.029 (2025-10-03)
GEOS version3.14.1-CAPI-1.20.5
SQLite version3.50.4
PDAL version2.9.0
PostgreSQL client versionunknown
SpatiaLite version5.1.0
QWT version6.3.0
QScintilla2 version2.14.1
OS versionWindows 11 Version 2009
 
Active Python plugins
db_manager0.1.20
grassprovider2.12.99
MetaSearch0.3.6
processing2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

Screenshot of creating a new feature as per the above steps attached below:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions