Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26847

QDateEdit wrong section size

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.8.2
    • Fix Version/s: 5.0.0
    • Labels:
      None
    • Environment:
      Windows, Linux
    • Commits:
      I3823cc41167ec920f742cb6a20d39fc5f433c915

      Description

      QDateEdit will show three-digit value for date with the following scenario:

      • QDateEdit has the display format set to ‘yyyy/MM/dd’
      • the date value is edited to ‘31’
      • focus is changed to month with Shift + Tab
      • the month value is edited to ‘2’
        -> the date value shows ‘291’ until cursor is moved or focus changed.

      The QDateTimeParser seems to calculate the section size incorrectly (sectionSize() returns 1) therefore the date is replaced incorrectly. In QDateTimeParser::StateNode QDateTimeParser::parse(QString &input, int &cursorPosition, const QDateTime &currentValue, bool fixup) method the 'input' has the three-digit day, but the 'newCurrentValue' has the correct date.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-26847
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              mitch_curtis Mitch Curtis
              Reporter:
              qtcomsupport Qt Support
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes