diff --git a/application/Espo/Core/SelectManagers/Base.php b/application/Espo/Core/SelectManagers/Base.php index a99d4be020..9a366a40d7 100644 --- a/application/Espo/Core/SelectManagers/Base.php +++ b/application/Espo/Core/SelectManagers/Base.php @@ -1127,6 +1127,13 @@ class Base $attribute . '<' => $dt->add(new \DateInterval('P1M'))->format('Y-m-d'), ); break; + case 'nextMonth': + $dt = new \DateTime(); + $part['AND'] = array( + $attribute . '>=' => $dt->modify('first day of next month')->format('Y-m-d'), + $attribute . '<' => $dt->add(new \DateInterval('P1M'))->format('Y-m-d'), + ); + break; case 'currentQuarter': $dt = new \DateTime(); $quarter = ceil($dt->format('m') / 3); diff --git a/application/Espo/Resources/i18n/en_US/Global.json b/application/Espo/Resources/i18n/en_US/Global.json index 4986058c4c..33681295e6 100644 --- a/application/Espo/Resources/i18n/en_US/Global.json +++ b/application/Espo/Resources/i18n/en_US/Global.json @@ -522,6 +522,7 @@ "future": "Future", "currentMonth": "Current Month", "lastMonth": "Last Month", + "nextMonth": "Next Month", "currentQuarter": "Current Quarter", "lastQuarter": "Last Quarter", "currentYear": "Current Year", diff --git a/client/src/views/fields/date.js b/client/src/views/fields/date.js index 77f54dc858..772e786457 100644 --- a/client/src/views/fields/date.js +++ b/client/src/views/fields/date.js @@ -42,7 +42,7 @@ Espo.define('views/fields/date', 'views/fields/base', function (Dep) { validations: ['required', 'date', 'after', 'before'], - searchTypeList: ['lastSevenDays', 'ever', 'isEmpty', 'currentMonth', 'lastMonth', 'currentQuarter', 'lastQuarter', 'currentYear', 'lastYear', 'today', 'past', 'future', 'lastXDays', 'nextXDays', 'olderThanXDays', 'afterXDays', 'on', 'after', 'before', 'between'], + searchTypeList: ['lastSevenDays', 'ever', 'isEmpty', 'currentMonth', 'lastMonth', 'nextMonth', 'currentQuarter', 'lastQuarter', 'currentYear', 'lastYear', 'today', 'past', 'future', 'lastXDays', 'nextXDays', 'olderThanXDays', 'afterXDays', 'on', 'after', 'before', 'between'], setup: function () { Dep.prototype.setup.call(this); diff --git a/client/src/views/fields/datetime.js b/client/src/views/fields/datetime.js index af0ffb2aa5..0588bad2df 100644 --- a/client/src/views/fields/datetime.js +++ b/client/src/views/fields/datetime.js @@ -36,7 +36,7 @@ Espo.define('views/fields/datetime', 'views/fields/date', function (Dep) { validations: ['required', 'datetime', 'after', 'before'], - searchTypeList: ['lastSevenDays', 'ever', 'isEmpty', 'currentMonth', 'lastMonth', 'currentQuarter', 'lastQuarter', 'currentYear', 'lastYear', 'today', 'past', 'future', 'lastXDays', 'nextXDays', 'olderThanXDays', 'afterXDays', 'on', 'after', 'before', 'between'], + searchTypeList: ['lastSevenDays', 'ever', 'isEmpty', 'currentMonth', 'lastMonth', 'nextMonth', 'currentQuarter', 'lastQuarter', 'currentYear', 'lastYear', 'today', 'past', 'future', 'lastXDays', 'nextXDays', 'olderThanXDays', 'afterXDays', 'on', 'after', 'before', 'between'], timeFormatMap: { 'HH:mm': 'H:i',