title: How to fix output with rowspan?
body: <p>I'm creating dynamic table and I want to display something like this:</p>
  
  <pre><code>Date               Time
                 7:00 AM - 7:15 AM
                 7:15 AM - 7:30 AM
  03/16/2016     7:30 AM - 7:45 AM
                 7:45 AM - 8:00 AM
                 8:00 AM - 8:15 AM  
  
    Date               Time
                 7:00 AM - 7:15 AM
                 7:15 AM - 7:30 AM
  05/05/2016     7:30 AM - 7:45 AM
                 7:45 AM - 8:00 AM
                 8:00 AM - 8:15 AM 
  </code></pre>
  
  <p>Table that I'm getting looks like this:</p>
  
  <pre><code>  Date               Time
  
                 7:15 AM - 7:30 AM
  03/16/2016     7:30 AM - 7:45 AM
                 7:45 AM - 8:00 AM
                     05/05/2016     7:00 AM - 7:15 AM
                                    7:15 AM - 7:30 AM
                                    7:30 AM - 7:45 AM
                                    7:45 AM - 8:00 AM
                                    8:00 AM - 8:15 AM 
  </code></pre>
  
  <p>Here is my code that I use to get this table built above:</p>
  
  <pre><code>function buildTbl(){
     var tbl = "&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Time&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;";
     tbl += "&lt;tbody&gt;";
     var count = 0;
     for (var i = 0; i &lt; dates.length; i++) {
          var entries = groupedByDate[dates[i]];
          tbl+= "&lt;tr&gt;&lt;td rowspan='"+count+"'&gt;"+dates[i]+"&lt;/td&gt;";
          for (var j = 0; j &lt; entries.length; j++) {
              tbl+="&lt;td&gt;"+entries[j].Slot_Label+"&lt;/td&gt;&lt;/tr&gt;";
              count++;
          }
      }
  
      tbl += "&lt;/tbody&gt;&lt;/table&gt;";
      $('#myTable').html(tbl);
  }
  </code></pre>
  
  <p>I'm not sure in which step where I'm building my table html code is wrong? I tried to switch around and put tr tag after each output but that did not fix my problem. If anyone see what is wrong in my code please let me know. Thanks. </p>