Half a fix for date field

There is now no error when saving and values are correctly set and updated.
There is still 1 issue:
 - when deleting the value set for the date, it doesn't perform any action on the DB