mirror of
https://github.com/espocrm/espocrm.git
synced 2026-07-01 08:26:04 +00:00
next month filter
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -522,6 +522,7 @@
|
||||
"future": "Future",
|
||||
"currentMonth": "Current Month",
|
||||
"lastMonth": "Last Month",
|
||||
"nextMonth": "Next Month",
|
||||
"currentQuarter": "Current Quarter",
|
||||
"lastQuarter": "Last Quarter",
|
||||
"currentYear": "Current Year",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user