title: Loop through ListView for matching calendar selectedDate
body: <p>I am looking to populate a <code>listView</code> of events on the currently <code>selectedDate</code> of a calendar with data from an array(<code>calendarListModel</code>)</p>
  
  <p>When a new date is selected from the calendar, I need the list to update, clearing and remaining empty if no events exist on the newly selected date, or replacing the listView with new delegates matching the newly selectedDate.</p>
  
  <p>My array is created from a read from a firebase database, which works as intended. An example of my array would be;</p>
  
  <pre><code>calendarListModel: [
      {"date":2019-02-12,"name":"user1"},
      {"date":2019-02-13","name":"user1"},
      {"date":2019-02-12,"name":"user2"}
  ]
  </code></pre>
  
  <p>If I set my model as <code>calendarListModel</code> My list shows every database entry regardless of date on the <code>listView</code>.</p>
  
  <p>I have tried things such as;</p>
  
  <p><code>model: calendarListView.date(calendar.selectedDate</code></p>
  
  <p>also using loops to access the data, which i have had no success with, and most recently the following example;</p>
  
  <pre><code>function updateEvents() {
                      var eventModel = calendarListModel.find(
                                  function(obj){
                                  return obj.date === calendar.selectedDate.getDate(),
                                  console.log(JSON.stringify(obj));
                                  }
                              );
                      if (eventModel === undefined)
                          return eventListModel.length = [];
                      return eventListModel.push(eventModel)
                  }
  
  Calendar {
          id: calendar
          selectedDate: new Date()
  
          onSelectedDateChanged: {
              const day = selectedDate.getDate();
              const month = selectedDate.getMonth() + 1;
              const year = selectedDate.getFullYear();
              updateEvents()
          }
      }
  
              ListView {
              id:eventListView
              model: eventListModel
          }
  </code></pre>
  
  <p>My console log from the <code>JSON.stringify(obj)</code> seems to split my array into individual objects, with the logs showing:</p>
  
  <p><code>{"date":1549972800000,"name":"user1"}
   {"date":1550059200000,"name":"user1"}
   {"date":1549972800000,"name":"user2"}</code></p>
  
  <p>but when doing this <code>eventListView</code> and <code>eventModel</code> remain blank? </p>
  
  <p>What can i do to correct this or what direction to i need to work in?</p>