This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
{ name: vm.lt("DateRangeNextWeek"), id: "**" },
|
{ name: vm.lt("DateRangeNextWeek"), id: "**" },
|
||||||
{ name: vm.lt("DateRangeLastMonth"), id: "**" },
|
{ name: vm.lt("DateRangeLastMonth"), id: "**" },
|
||||||
{ name: vm.lt("DateRangeThisMonth"), id: "**" },
|
{ name: vm.lt("DateRangeThisMonth"), id: "**" },
|
||||||
{ name: vm.lt("DateRangeNextMonth"), id: "*nextmonth*" },
|
{ name: vm.lt("DateRangeNextMonth"), id: "**" },
|
||||||
{ name: vm.lt("DateRange14DayWindow"), id: "*14daywindow*" },
|
{ name: vm.lt("DateRange14DayWindow"), id: "*14daywindow*" },
|
||||||
{ name: vm.lt("DateRangePast"), id: "*past*" },
|
{ name: vm.lt("DateRangePast"), id: "*past*" },
|
||||||
{ name: vm.lt("DateRangeFuture"), id: "*future*" },
|
{ name: vm.lt("DateRangeFuture"), id: "*future*" },
|
||||||
@@ -171,14 +171,6 @@ export default {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "*thismonth*":
|
case "*thismonth*":
|
||||||
//start with the first day of this month
|
|
||||||
// dtAfter = new DateTime(RelativeToday.Year, RelativeToday.Month, 1, RelativeToday.Hour, RelativeToday.Minute, 00);
|
|
||||||
|
|
||||||
// //Add one month to dtAfter to get end date
|
|
||||||
// dtBefore = dtAfter.AddMonths(1);
|
|
||||||
|
|
||||||
// //case 1155
|
|
||||||
// dtAfter = dtAfter.AddSeconds(-1);
|
|
||||||
//start with the first day of this month
|
//start with the first day of this month
|
||||||
var dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
|
var dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
|
||||||
//Add one month to dtAfter to get end date
|
//Add one month to dtAfter to get end date
|
||||||
@@ -186,6 +178,24 @@ export default {
|
|||||||
//move after back a second for boundary
|
//move after back a second for boundary
|
||||||
dtAfter = dtAfter.plus({ seconds: -1 });
|
dtAfter = dtAfter.plus({ seconds: -1 });
|
||||||
|
|
||||||
|
//set return values from calculated values
|
||||||
|
ret.after = dtAfter.toUTC().toString();
|
||||||
|
ret.before = dtBefore.toUTC().toString();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "*nextmonth*":
|
||||||
|
//start with the first day of this month
|
||||||
|
var dtAfter = window.$gz.DateTime.local(dtNow.year, dtNow.month, 1);
|
||||||
|
|
||||||
|
//add a month
|
||||||
|
dtAfter = dtAfter.plus({ months: 1 });
|
||||||
|
|
||||||
|
//Add one month to dtAfter to get end date
|
||||||
|
var dtBefore = dtAfter.plus({ months: 1 });
|
||||||
|
|
||||||
|
//move after back a second for boundary
|
||||||
|
dtAfter = dtAfter.plus({ seconds: -1 });
|
||||||
|
|
||||||
//set return values from calculated values
|
//set return values from calculated values
|
||||||
ret.after = dtAfter.toUTC().toString();
|
ret.after = dtAfter.toUTC().toString();
|
||||||
ret.before = dtBefore.toUTC().toString();
|
ret.before = dtBefore.toUTC().toString();
|
||||||
|
|||||||
@@ -916,8 +916,8 @@ function untokenizeListView(lv) {
|
|||||||
//iterate the array and build a new array with substituted tokens with the correct date and time in them
|
//iterate the array and build a new array with substituted tokens with the correct date and time in them
|
||||||
//console.log(lv);
|
//console.log(lv);
|
||||||
//console.log(JSON.parse(lv));
|
//console.log(JSON.parse(lv));
|
||||||
console.log("test:thismonth");
|
console.log("test:nextmonth");
|
||||||
console.log(relativeDatefilterCalculator.tokenToDates("*thismonth*"));
|
console.log(relativeDatefilterCalculator.tokenToDates("*nextmonth*"));
|
||||||
//[{"fld":"widgetname"},{"fld":"widgetstartdate","filter":{"items":[{"op":"=","value":"*past90days*","token":true}]}},{"fld":"widgetenddate"}]
|
//[{"fld":"widgetname"},{"fld":"widgetstartdate","filter":{"items":[{"op":"=","value":"*past90days*","token":true}]}},{"fld":"widgetenddate"}]
|
||||||
if (lv == null) {
|
if (lv == null) {
|
||||||
return lv;
|
return lv;
|
||||||
|
|||||||
Reference in New Issue
Block a user