LPS-33071 Improve logic to enable form submitting only when both dates are valid