Fixed a couple bugs: If an invalid date is typed date becomes false and date.getTime() causes an exception. If an invalid value is typed a date can't be selected.
test(datepicker): add unit test to properly handle invalid values