-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time search on date not working #784
Comments
?? |
up |
any answer and solution? |
I do not think there is a quick/simple solution to this since attr/value separators are hardcoded in the Personally, I would go with some custom criteria class that I would push whenever it's needed. For example, having class StartAtBetweenCriteria implements CriteriaInterface
{
public function __construct(private string $startAtBetween)
{
}
public function apply($model, RepositoryInterface $repository)
{
$startAtBetween = explode(',', $this->startAtBetween);
if (isset($startAtBetween[0]) && isset($startAtBetween[1])) {
$model = $model->whereBetween("start_at", "=", $startAtBetween);
}
return $model;
}
} Later on, you can push this criteria whenever you need it, ie $this->repository->pushCriteria(new StartAtBetweenCriteria($request->get('start_at'))); |
hi
i want to get all item From '2023-01-31 07:00:00' until '2023-01-31 07:30:00' for example:
i search looks like:
search=start_at:'2023-01-31 07:00:00', '2023-01-31 07:30:00'&searchFields=start_at:between
and in config file add between condition but not working! search on hour and minute not work! return all days!The text was updated successfully, but these errors were encountered: