Generate DateField from DateField on the model

Fixes #1185.