Another attempt at resolving the date validation issues