title: display events only on onclick of the day of events
body: <p>I have this code im using to display events from a calendar but its displaying ALL of the events for that month and I only want to display the events for the day when a user clicks on a certain day. For example, click on February 10, you get all of the events for that day. </p>
  
  <pre><code>        var eventList = $('&lt;div/&gt;').addClass('c-event-list');
  
          for (var i = 0; i &lt; settings.events.length; i++) {
              var d = settings.events[i].datetime;
  
              if ((d.getMonth() - 1) == dMonth &amp;&amp; d.getFullYear() == dYear) {
                  var date = lpad(d.getMonth(), 2) + '/' +
                             lpad(d.getDate(), 2) + ' ' +
                             lpad(d.getHours() %12, 2) + ':' +
                             lpad(d.getMinutes(), 2);
                  var item = $('&lt;div/&gt;').addClass('c-event-item');
                  var title = $('&lt;div/&gt;')
                               .addClass('title')
                               .html(date + '  ' + settings.events[i].title + '&lt;br /&gt;');
                  var description = $('&lt;div/&gt;')
                                     .addClass('description')
                                     .html(settings.events[i].description + '&lt;br /&gt;');
  
                  item.attr('data-event-day', d.getDate());
                  item.on('mouseover', mouseOverItem).on('mouseleave', mouseLeaveItem);
                  item.append(title).append(description);
                  eventList.append(item);
              }
         }
  
         $(instance).addClass('calendar');
         cEventsBody.append(eventList);
         $(instance).html(cBody).append(cEvents);
      }
  
      return print();
  }
  </code></pre>
  
  <p>Thanks in advance for any assistance.  </p>