-
Notifications
You must be signed in to change notification settings - Fork 342
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
DateTime Filter issue #305
Comments
I've made a quick and dirty fix in Source.php line 263. I've added the follow lines and it works. if($column->getType() == 'datetime') {
$value = $value->format('Y-m-d H:i:s');
} |
It's weird, I know this error and I'm certain that I've already correct it. Maybe on my personnal branch. |
We several problems too. After that we try to compare a string date case Column\Column::OPERATOR_GT:
$found = $fieldValue > $value;
break;
case Column\Column::OPERATOR_GTE:
$found = $fieldValue >= $value;
break;
case Column\Column::OPERATOR_LT:
$found = $fieldValue < $value;
break;
case Column\Column::OPERATOR_LTE:
$found = $fieldValue <= $value;
break; |
Yes the problem is not only for the equal operator. |
Hello @Abhoryo, Have you look into this error ? You've written that you thought you have fixed this issue on your personnal branch. Have you found it ? |
I've fix the same line that you but not the last ones. |
Hello, my english is not good, but I can fix this problem add follow line in Source.php line 260: |
This issue is too old and there are chances that your problem isn't linked to this issue. |
Hello,
I'm trying to filter my results set on a field with a datetime type and having some issue.
I've tried differents formats for the date, like "29/10/2012" (d/m/Y) and "2012-10-29" (Y-m-d) with the equals operator.
In the first case (29/10/2012), the column is not considered filtered : I test it with the method $column->isFiltered() and it returns me false.
In the second case, the column is considered filtered, but I have this error :
the regex at line 268 expects a string but $value is a DateTime Object.
Am I doing something wrong ?
Thanks for your help
The text was updated successfully, but these errors were encountered: