fix(datepicker): fix errors while typing invalid values (fixes #623)