fixed bug where enddate was filling with unix epoch because empty string was being submitted instead of null