Fixed client-side validation of date fields