Datepicker and new rows..

Datepicker and new rows..

Hey Guys,

I've got this code:

  1.   $('.datepicker').hover(function(){
  2.           $(this).datepicker({
  3.         dateFormat: 'dd-mm-yy'
  4.         });
  5.   });
  6.  
  7.     $('.addrow').click(function(){
  8.         $('#tableform tbody>tr:last').clone(true).insertAfter('#tableform tbody>tr:last').show("slow");
  9.            $('#tableform tbody>tr:last input').val('');
  10.         totalrows++;
  11.     });
I basically have a table where the user can add an extra row to input data, that all works fine, the issue that I have is with the datepicker. When i've loaded the page, I can add a number of rows to the table and each input with the class 'datepicker' will display the datepicker. But if i add a row after I have already 'picked a date on another row' when clicking on the newly added input it will only display the datepicker on the last input in the table before clicking to add a new row (so the row above), and if i add another row and click on the new input it will only show the datepicker on the last row that was originally there the first time I ever loaded the datepicker (two rows above).

Any ideas how i can get around this?

Thanks.