Skip to content

Commit 50d6748

Browse files
Fix time picker not to show [object Object] (#182152)
## Summary This PR fixes one i18n mapping for EUI to render the `dateFormat` = `MMM D, YYYY @ HH:mm:ss.SSS` correctly at the bottom. Note: It showed `[object Object]` instead of `MMM D, YYYY @ HH:mm:ss.SSS` before this fix. Fixes #182099 ## Release note Fixes time picker to show allowed formats properly in absolute tabs. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 parent cc21a1a commit 50d6748

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,11 +1389,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
13891389
'core.euiDatePopoverContent.nowTabButtonEnd',
13901390
{ defaultMessage: 'Set end date and time to now' }
13911391
),
1392-
'euiAbsoluteTab.dateFormatError': ({ dateFormat }: EuiValues) =>
1393-
i18n.translate('core.euiAbsoluteTab.dateFormatError', {
1394-
defaultMessage: 'Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp.',
1395-
values: { dateFormat },
1396-
}),
1392+
'euiAbsoluteTab.dateFormatError': ({ dateFormat }: EuiValues) => (
1393+
<FormattedMessage
1394+
id="core.euiAbsoluteTab.dateFormatError"
1395+
defaultMessage="Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp."
1396+
values={{ dateFormat }}
1397+
/>
1398+
),
13971399
'euiRelativeTab.fullDescription': ({ unit }: EuiValues) =>
13981400
i18n.translate('core.euiRelativeTab.fullDescription', {
13991401
defaultMessage: 'The unit is changeable. Currently set to {unit}.',

0 commit comments

Comments
 (0)