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

CalendarModel returns months with indexed [1-12] instead of [0-11]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • 5.6.1
    • 5.6.0
    • Quick: Controls 2
    • None

      Example from documentation:

      ListView {
            id: listview
            width: 200; height: 200
            snapMode: ListView.SnapOneItem
            orientation: ListView.Horizontal
            highlightRangeMode: ListView.StrictlyEnforceRange
      
            model: CalendarModel {
                from: new Date(2015, 0, 1)
                to: new Date(2015, 11, 31)
            }
      
            delegate: MonthGrid {
                width: listview.width
                height: listview.height
                month: model.month
                year: model.year
            }
        }
      

      The error appeared in runtime is: "QML AbstractMonthGrid: month 12 is out of range [0...11]"

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alexxey593 Stolyarov Aleksey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes