fix(datepicker): mark input field as invalid if the date is invalid

Closes #1845