Skip to content

Commit

Permalink
Fixes issue with setting a custom filter date (#1481)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss authored Jul 26, 2021
1 parent 5aa9690 commit 3a169f6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import startOfYear from "date-fns/startOfYear"
import startOfMonth from "date-fns/startOfMonth"
import lastDayOfMonth from "date-fns/lastDayOfMonth"
import { endOfQuarter, startOfQuarter, subQuarters } from "date-fns"
import parseISO from "date-fns/fp/parseISO"
let today = function () {
let now = new Date()
Expand Down Expand Up @@ -171,16 +172,18 @@ export default {
this.window = {}
},
setWindowStart: function (start) {
start = parseISO(start)
start.setHours(0, 0, 0, 0)
this.window = {
start: start.toISOString(),
end: this.window.end.toISOString(),
end: this.window.end,
}
},
setWindowEnd: function (end) {
end = parseISO(end)
end.setHours(23, 59, 59, 999)
this.window = {
start: this.window.start.toISOString(),
start: this.window.start,
end: end.toISOString(),
}
},
Expand Down

0 comments on commit 3a169f6

Please sign in to comment.