🇭🇺Hungary SunnyGambino Buj
Patch based on 2982968-core-views-improve-date-filter-56.patch.
Just quick fix to make sure there are no warnings, otherwise AJAX reset button won't work, as it is throwing these annoying warning. :)
🇭🇺Hungary SunnyGambino Buj
Let me share the proposed solution as a patch.
--- web/core/modules/views/src/Plugin/views/filter/Date.php
+++ web/core/modules/views/src/Plugin/views/filter/Date.php
@@ -144,7 +144,7 @@ public function acceptExposedInput($input) {
elseif ($operators[$operator]['values'] == 2) {
// When the operator is either between or not between the input contains
// at least one value.
- if ($this->value['min'] == '' && $this->value['max'] == '') {
+ if (empty($this->value['min']) && empty($this->value['max'])) {
return FALSE;
}
}
--- web/core/modules/views/src/Plugin/views/filter/NumericFilter.php
+++ web/core/modules/views/src/Plugin/views/filter/NumericFilter.php
@@ -451,7 +451,7 @@ public function acceptExposedInput($input) {
break;
case 2:
- if ($value['min'] === '' && $value['max'] === '') {
+ if (empty($value['min']) && empty($value['max'])) {
return FALSE;
}
break;
🇭🇺Hungary SunnyGambino Buj
sunnygambino → created an issue.
🇭🇺Hungary SunnyGambino Buj
Hi All,
#6 is the solution. May I suggest to add it somewhere in the documentation please?
🇭🇺Hungary SunnyGambino Buj
Thanks for the documentation! It saved me hours! I would like to suggest to place it into a README.md file into the codebase!