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

QDateEdit wrong section size

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3: Somewhat important
    • Resolution: Done
    • 4.8.2
    • 5.0.0
    • None
    • Windows, Linux
    • 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

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

          Activity

            People

              mitch_curtis Mitch Curtis
              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