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

Default value of `date` QML primitive?

XMLWordPrintable

    • All
    • 71c20290d6d0abc2f8846e20833cff2962cedf0a

      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?

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes