betsol / angular-input-date

AngularJS directive to enable support for date input type
38 stars 19 forks source link

parseDateString returns null on invalid datestring rather than throwing an exception #1

Closed DigTheDoug closed 10 years ago

DigTheDoug commented 10 years ago

Ran into a few cases where the parseDate function would get an 'undefined' and throw an exception on the split. This happens in some cases from user error, but also when I try to do things such as set the input value to blank to force a dirty flag. It'd be nice if it just became invalid in the case of a invalid value rather than raising a browser exception.

slavafomin commented 10 years ago

Good catch @DigTheDoug! Thank you for your contribution = )

slavafomin commented 10 years ago

I've updated the version to 1.0.3.