Fix bug when setting a date field with undefined value
Merge pull request #1881 from mohlman3/bugfix/undefined_set_date

Fix bug when setting a date field with undefined value