Check date format before saving