I want to validate date when user click Apply button. How can I stop it close if the date is fail validation?