Fixed default to date population so that javascript autopop works

When a default value is provided the javascript autopopulation does not fire. 

This patch fixes that.