This code is from google calender.
var dateString =  (startJSDate.getMonth() + 1) + "/" + startJSDate.getDate();
  if (!startDateTime.isDateOnly()) {
  dateString += " @ " + startJSDate.getHours() + ":" + 
  padNumber(startJSDate.getMinutes());
}
 dateString = "<span>" +dateString + "</span>";
 var li = document.createElement('li');
I need to add a span tag around the variable dateString, adding them as above returns "1234" as text on the page.
The string is rendered as such:
li.appendChild(document.createTextNode(' - ' + dateString));
 
     
    