add widget.formatValue and implement custom formatValue for date fields

this puts the corrent value in the value attribute for date fields