Date range functionality working