[fix bug 968077] Fix 500 error caused by empty datefield.
Merge pull request #618 from akatsoulas/968077

[fix bug 968077] Fix 500 error caused by empty datefield.