title: Bootstrap DatePicker not working with Jquery Datatables
body: <p>No console errors, just doesn't work.</p>
  
  <pre><code>if (typeof (data.maintExpiry) === 'undefined') { 
      data.maintExpiry = '01-01-1970' 
  }
  if (typeof (data.maintExpiry) === 'undefined') { 
      data.maintExpiry = new Date('01-01-1970') 
  } //also doesn't work
  
  someColumn = '&lt;span&gt;test&lt;/span&gt;'
  maintExpiry = '&lt;div class="input-append date" class="datepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy"&gt;'
  maintExpiry += '&lt;input style="display: inline;padding-left: 20px;" size="16" type="text" value="' + data.maintExpiry + '"&gt;'
  maintExpiry += '&lt;span class="add-on"&gt;&lt;i class="icon-th"&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;'
  someOtherColumn = '&lt;span&gt;test2&lt;/span&gt;'
  ...
  $('#myReport').dataTable().fnAddData([
      someColumn,
      maintExpiry,
      someOtherColumn
  ]);
  </code></pre>
  
  <p>Then in the document.ready:</p>
  
  <pre><code>$('#myReport').dataTable({
      "fnDrawCallback": function (oSettings) {
          $('.datepicker').each(function () {
              $(this).datepicker();
          });
      }
  });
  </code></pre>
  
  <p>The reason I ended up putting datepicker() in the fnDrawCallback function of dataTables is because I previously had issues with bootstrap popovers only applying to elements on the first page.  This ensured they applied to everything on the page every time the page was changed.  I also tried datepicker() outside of this with no luck.</p>
  
  <p>I'm doing the each() function since the bootstrap datepicker docs show using an id selector and since these are dynamically generated I was hoping I could do it via the class.  I also simply tried $('.datepicker').datepicker() but that didn't work either.</p>
  
  <p>Again, no console errors or anything.  It looks like it should but zero behavior on click in IE and Chrome.  Well, I can type in the input box...</p>
  
  <p><strong>update</strong> I just realized I had the class definition twice. I  consolidated the two and now I get a console error of "Uncaught TypeError: Cannot call method 'split' of undefined - bootstrap-datepicker.js:393  Investigating...</p>
  
  <p><strong>update 2</strong> Looks like I'm trying to populate the field with an invalid date.  I've added the line below.  Any ideas how I can set a default date if there is no date returned?</p>