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

QML Calendar component takes times into account when interpreting minimalDate/maximalDate

    XMLWordPrintable

Details

    • Windows
    • b1b68aa279275e93b867c29fa42350f42b9d9728 (qt/qtquickcontrols/5.12)

    Description

      There is a bug in Calendar type, if user specifies time in Date() function, then time is getting considered in deciding to enable and disable dates in Calendar. And somehow, 12:00:00 looks to be cut-off for this, Like if you execute the following code:

      Calendar{    
        minimumDate: new _Date_(2018, 10, 1,11,59,00) // Enables 1st Nov, 2018   
        maximumDate: new _Date_(2018, 11, 1,11,59,00) // Disables 1st Dec, 2018
      }
      

      But when I change time to something past 12:00:00, its behavior changes like

      Calendar {    
        minimumDate: new _Date_(2018, 10, 1,12,01,00)  // Disables 1st Nov, 2018
        maximumDate: new _Date_(2018, 11, 1,12,01,00) // Enables 1st Dec, 2018
      }
      

      I find this unexpected as time should not be considered in deciding the minimum or maximum date.

       

      Attachments

        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
            shmittal Shveta Mittal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes