change determination of date string for mindate and maxdate