added set min and max dates functionality