Skip to content

Commit

Permalink
Use dateFormat instead of dateFormat:scaled
Browse files Browse the repository at this point in the history
Signed-off-by: sitbubu <royi.sitbon@logz.io>
  • Loading branch information
RoyiSitbon committed May 13, 2022
1 parent a3276b0 commit 61116c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class DashboardListing extends React.Component {
}

getTableColumns() {
const [, dateFormat] = this.props.core.uiSettings.get('dateFormat:scaled')[3];
const dateFormat = this.props.core.uiSettings.get('dateFormat');
const tableColumns = [
{
field: 'title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const SavedObjectsTablePage = ({
}) => {
const capabilities = coreStart.application.capabilities;
const itemsPerPage = coreStart.uiSettings.get<number>('savedObjects:perPage', 50);
const [, dateFormat] = coreStart.uiSettings.get<string>('dateFormat:scaled')[3];
const dateFormat = coreStart.uiSettings.get<string>('dateFormat');

useEffect(() => {
setBreadcrumbs([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const getTableColumns = (
}),
['data-test-subj']: 'updated-at',
render: (updatedAt: string) =>
updatedAt && moment(updatedAt).format(uiSettings.get('dateFormat:scaled')[3][1]),
updatedAt && moment(updatedAt).format(uiSettings.get('dateFormat')),
},
];

Expand Down

0 comments on commit 61116c6

Please sign in to comment.