Fix js form validation for date