Created
August 4, 2025 14:24
-
-
Save junaidpv/019a598024d262c310ffc0a5eafb6cce to your computer and use it in GitHub Desktop.
Modified https://www.drupal.org/project/drupal/issues/2455971#comment-16216237 to apply on wwm platforms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php | |
index 84d776c4b64..8d07427e550 100644 | |
--- a/core/modules/views/src/Plugin/views/filter/Date.php | |
+++ b/core/modules/views/src/Plugin/views/filter/Date.php | |
@@ -220,4 +220,20 @@ | |
$this->query->addWhereExpression($this->options['group'], "$field $this->operator {$values['value']}"); | |
} | |
+ /** | |
+ * {@inheritdoc} | |
+ */ | |
+ public function operators() { | |
+ $operators = parent::operators(); | |
+ $operators['<']['title'] = $this->t('Before'); | |
+ $operators['<=']['title'] = $this->t('Before or On'); | |
+ $operators['=']['title'] = $this->t('On'); | |
+ $operators['!=']['title'] = $this->t('Not On'); | |
+ $operators['>=']['title'] = $this->t('On or After'); | |
+ $operators['>']['title'] = $this->t('After'); | |
+ $operators['between']['title'] = $this->t('Between'); | |
+ $operators['not between']['title'] = $this->t('Not Between'); | |
+ | |
+ return $operators; | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment