I have an HTML table with...

<tr><td>button</td><td>text</td><td>input type="date"</td></tr>

The button is for deleting the row. I call this function...

Code:
function deleteRow(tableName, rowIndex) {
    var maxRow = tableName.rows.length;
    var t = tableName.rows[rowIndex + 1].cells[1].innerText;
    if(confirm("Delete row: " + t + " ?")) {
        for(var x = rowIndex + 2; x <= maxRow; x++) {
            tableName.rows[x - 1].cells[1].innerText = tableName.rows[x].cells[1].innerText;
            tableName.rows[x - 1].cells[2].value = tableName.rows[x].cells[2].value;            
        }
        
    }
}
The problem is, it deletes the text and moves everything below up one row, but the date values don't change. What am i doing wrong?