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

Default value of `date` QML primitive?

    XMLWordPrintable

    Details

      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

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

          Activity

            People

            Assignee:
            qtqmlteam Qt Qml Team User
            Reporter:
            ratijas ivan tkachenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes