add minDate and maxDate