Got it working so that the dates are defalt values i.e. if the field is not entered than a default value is assigned