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

Default value of `date` QML primitive?

    XMLWordPrintable

Details

    • All
    • 71c20290d6d0abc2f8846e20833cff2962cedf0a

    Description

      Default value for date properties is not specified in documentation. Apparently, one can not rely on null comparison to detect uninitialized date properties, and an attempt to print such value to the console results in this:

      property date lastEvent
      if (lastEvent !== null) {
        print(`E: lastEvent`)
      }
      
      qml: E: Invalid Date
      

      1. What the heck? I've found nothing like that on MDN.
      2. OK, so how do I check whether a date property has been initialized?

      Attachments

        Issue Links

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

          Activity

            People

              javyas Jaishree Vyas
              ratijas ivan tkachenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes