See, instead of using innerHTML and then readjusting everything, you could do this:
Code:
var tbl = document.getElementById("theTable");
var newrow = tbl.insertRow(-1);
var td0 = newrow.insertCell(-1);
td0.className ="title";
td0.appendChild( document.createTextNode( tbl.rows.length + ":" ) );
var td1 = newrow.insertCell(-1);
var inp1 = document.createElement("input");
inp1.type="text";
inp1.placeholder = "Giving";
inp1.className = "selector";
inp1.name = "giving" + tbl.rows.length;
inp1.autocomplete = "off"; // ??? or false???
td1.appendChild(inp1);
var td2 = newrow.insertCell(-1);
var inp2 = document.createElement("input");
inp2.type="text";
inp2.placeholder = "Getting";
inp2.className = "selector";
inp2.name = "getting" + tbl.rows.length;
inp2.autocomplete = "off"; // ??? or false???
td2.appendChild(inp2);
var td3 = newrow.insertCell(-1);
var inp3 = document.createElement("input");
inp3.type="text";
inp3.className = "popupdate";
inp3.name = inp3.id = "popupdate" + tbl.rows.length;
inp3.value = "when";
... code here to attach the calendar events to this element...
td3.appendChild(inp3);
That really isn't that much code, and it's much clearner than using innerHTML.