startdate and enddate validation working