Except for the <todo:deadline> I added to index.html, I believe the
following are the only changes made to the original tutorial code
Additions to TD.scala
val dateFormat = new SimpleDateFormat("MM/dd/yyyy, hh:mm a")
private def deadline(td: ToDo, reDraw: () => JsCmd) =
swappable(<span class="deadline">{td.deadline}</span>,
<span class="deadline">
{ajaxText(td.deadline.toString,
v => {td.deadline(dateFormat.parse(v)).save;
reDraw()})}
</span>)
This was added to bind in the toList method.
"deadline" -> deadline(td, reDraw)
and this was added to bind in doBind within the add method
"deadline" -> todo.deadline.toForm,
Addition to ToDo.scala
object deadline extends MappedDateTime(this){
val dateFormat = new SimpleDateFormat("MM/dd/yyyy, hh:mm a")
override def defaultValue = time(millis + days(5))
override def asHtml = Text(toString)
override def toString = dateFormat.format(is)