Problem with clone() and datepicker

Problem with clone() and datepicker

Hello peeps.

I'm having a bit of a problem with cloned table rows and creating datepickers.

I use this function ...
  1. Admin.Page.copyRange = function($row){
  2.       var $table = $row.parents('tbody').eq(0);
  3.       var $clone = $row.clone();
  4.       $table.append($clone);
  5.       $clone.find('input.date').datepicker({dateFormat:'dd/mm/yy'});
  6.       $("#quotes-table").tableDnDUpdate();
  7. }

... to clone the passed in row and append it to the table. That part works great.

When I try to create a datepicker on the input fields with a date class nothing happens. Incidently, the table drag and drop update call fails to work too.

I had another function to create a new empty row that does something similar but the row is created with a big old HTML string instead, that works fine.

Any idea, peeps. I'm scratching my head a bit here.