fixed the date range

date range was returning an error if the search button was pressed while
the date range boxes were empty