Fix bugs in date validation

Todd, this is the work from team failure on task 6.
This pull request is to fix the bug in date validation in assignment editing page.

Please take a look and give us the feedback.
Thanks