Skip to content

Commit

Permalink
Make date transformation same as in context_menu_helpers.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kroussou committed Oct 6, 2021
1 parent 5da7d0c commit 7939f00
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ export function ReportDetails(props: { match?: any; setBreadcrumbs?: any; httpCl
timeRangeMatcher
);

fromDateString = fromDateString.replace(/[']+/g, '').replace('%2F','/');
toDateString = toDateString.replace(/[']+/g, '').replace('%2F','/');
fromDateString = decodeURIComponent(fromDateString.replace(/[']+/g, ''));
toDateString = decodeURIComponent(toDateString.replace(/[']+/g, ''));

let fromDateParsed = dateMath.parse(fromDateString);
let toDateParsed = dateMath.parse(toDateString);
let toDateParsed = dateMath.parse(toDateString, { roundUp: true });

const fromTimePeriod = fromDateParsed?.toDate();
const toTimePeriod = toDateParsed?.toDate();
Expand Down

0 comments on commit 7939f00

Please sign in to comment.