Fixed search method for date range

#248