Datepicker: reject dates with two year digits when expecting 'yy'

parseDate accepts dates with two year digits when using formats like 'mm/dd/yy'. With 'yy', it should only accept years with four digits.

Fixes #8353