diff --git a/dashboards-observability/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap b/dashboards-observability/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap index 827012815..a4bc6e0ec 100644 --- a/dashboards-observability/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap +++ b/dashboards-observability/public/components/notebooks/components/paragraph_components/__tests__/__snapshots__/para_output.test.tsx.snap @@ -77,6 +77,6 @@ exports[` spec renders visualization outputs 1`] = ` class="euiText euiText--small" style="margin-left: 9px;" > - 07/21/2020 06:37 PM - 08/20/2020 06:37 PM + 2020-07-21T18:37:44+00:00 - 2020-08-20T18:37:44+00:00 `; diff --git a/dashboards-observability/public/components/notebooks/components/paragraph_components/para_output.tsx b/dashboards-observability/public/components/notebooks/components/paragraph_components/para_output.tsx index 06b07327a..172b5d20d 100644 --- a/dashboards-observability/public/components/notebooks/components/paragraph_components/para_output.tsx +++ b/dashboards-observability/public/components/notebooks/components/paragraph_components/para_output.tsx @@ -12,8 +12,8 @@ import { DashboardContainerInput, DashboardStart, } from '../../../../../../../src/plugins/dashboard/public'; -import { UI_DATE_FORMAT } from '../../../../../common/constants/shared'; import { ParaType } from '../../../../../common/types/notebooks'; +import { uiSettingsService } from '../../../../../common/utils'; import { QueryDataGridMemo } from './para_query_grid'; /* @@ -106,8 +106,9 @@ export const ParaOutput = (props: { ); case 'VISUALIZATION': - let from = moment(visInput?.timeRange?.from).format(UI_DATE_FORMAT); - let to = moment(visInput?.timeRange?.to).format(UI_DATE_FORMAT); + const dateFormat = uiSettingsService.get('dateFormat'); + let from = moment(visInput?.timeRange?.from).format(dateFormat); + let to = moment(visInput?.timeRange?.to).format(dateFormat); from = from === 'Invalid date' ? visInput.timeRange.from : from; to = to === 'Invalid date' ? visInput.timeRange.to : to; return (