Fix date validation with the datepicker field