diff --git a/dashboards-reports/public/components/main/report_details/report_details.tsx b/dashboards-reports/public/components/main/report_details/report_details.tsx index 281617f0..3fc01585 100644 --- a/dashboards-reports/public/components/main/report_details/report_details.tsx +++ b/dashboards-reports/public/components/main/report_details/report_details.tsx @@ -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();