anchor.diff:            $('#time_sheet_month').val(e.date.getMonth()+1);
             $('#time_sheet_year').val(e.date.getFullYear());
         });
  +
  +  function getRowInputs($row) {
  +    return $row.find('input:not([type=hidden])').not('.hidden');
  +  }
  +
  +  function getRowSelects($row) {
  +    return $row.find('select');
  +  }
  +
  +  function clearRow($row) {
  +    var inputs = getRowInputs($row);
  +    var selects = getRowSelects($row);
  +    inputs.val('');
  +    selects.prop('selectedIndex', 0);
  +  }
  +
  +  $('.clear').click(function(){
  +    var tr = $(this).closest('tr');
  +    clearRow(tr);
  +  });
  +
  +  $('.duplicate').click(function(){
  +    var current_tr = $(this).closest('tr');
  +    var current_inputs = getRowInputs(current_tr);
  +    var current_selects = getRowSelects(current_tr);
  +    // .next() returns a hidden input (of the nested form)
  +    var next_tr = current_tr.nextAll('tr').first();
  +    var next_inputs = getRowInputs(next_tr);
  +    var next_selects = getRowSelects(next_tr);
  +
  +    current_inputs.each(function(i) {
  +      next_inputs.eq(i).val($(this).val());
  +    });
  +    current_selects.each(function(i) {
  +      // var current_option = $(this).find('option:selected').index();
  +      var current_opt = $(this).prop('selectedIndex');
  +      next_selects.eq(i).prop('selectedIndex', current_opt);
  +    });
  +  });
  +
   });
   </script>
   
  
positive.code:   td.notes {
      text-align: left !important; 
    }
  </style>
  
  <script>
  $( document ).ready(function() {
    $(function () {
      $('#submit').click(function (event) {
  
negative.code: 
    td {
      text-align: center;
      position: relative;
    }
  
    th {
      text-align: center;
    }
  