prevent the date/function from accepting dates in the past