Changed the way to set Min and Max Date to Ranges