Properly encapsulated the validation of the date pickers