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

Qt Quick Calendar: 1st row sometimes contains only days from the previous month

    XMLWordPrintable

Details

    • f922336b81 (qt/qtdeclarative/dev) f922336b81 (qt/tqtc-qtdeclarative/dev) f0579b96a9 (qt/qtdeclarative/6.3) 3902f825d3 (qt/qtdeclarative/6.4) 3902f825d3 (qt/tqtc-qtdeclarative/6.4)

    Description

      See attached screenshots, which are set to January 2023.

      Expected behaviour: The first day displayed should be 1 Jan. This is how other calendar apps behave (tested Gnome Calendar, Google Calendar, Windows 10 system calendar)

      Actual behaviour: The first day displayed is 25 Dec.

      import QtQuick 2.15
      import QtQuick.Controls 6.3
      import QtQuick.Window 2.15
      import QtQuick.Layouts 1.15
      
      Window {
          id: window
          width: 640
          height: 480
          visible: true
      
      GridLayout {
              columns: 2
              
              DayOfWeekRow {
                  locale: cal.locale
                  
                  Layout.column: 1
                  Layout.fillWidth: true
              }
              
              WeekNumberColumn {
                  month: cal.month
                  year: cal.year
                  locale: cal.locale
                  
                  Layout.fillHeight: true
              }
              
              MonthGrid {
                  id: cal
                  month: Calendar.January
                  year: 2023
                  locale: Qt.locale("en_US")
                  
                  delegate: Text {
                      text: model.day
                      color: model.month === cal.month ? "black" : "gray"
                  }
                  
                  Layout.fillWidth: true
                  Layout.fillHeight: true
              }
          }
      }
      

      Attachments

        1. QTBUG-100554.zip
          1 kB
          Sze Howe Koh
        2. QtQuickCalendar.png
          17 kB
          Sze Howe Koh
        3. Win10Calendar.png
          87 kB
          Sze Howe Koh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mitch_curtis Mitch Curtis
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes