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

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

    XMLWordPrintable

Details

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

    Description

      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]"

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes