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

QDateEdit wrong section size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.0.0
    • 4.8.2
    • None
    • Windows, Linux
    • I3823cc41167ec920f742cb6a20d39fc5f433c915

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes