Hi Amos,
I can see some "problems" with your code.
1.
var element = document.getElementByClassName(inputId);
This will search for ClassName instead of element Id.
2.
getDateTime("+DateTitle.Id+");
Here, you have to pass the id as string in order to concatenate in your funcion.
try:
getDateTime('"+DateTitle.Id+"');
Summary:
changes to make on your function:
var element = document.getElementById(inputId);
changes to make on your expression:
getDateTime('"+DateTitle.Id+"');
Hope it helps.
Cheers