Skip to content

Commit

Permalink
Fix time picker not to show [object Object] (elastic#182152)
Browse files Browse the repository at this point in the history
## 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 elastic#182099

## Release note

Fixes time picker to show allowed formats properly in absolute tabs.

---------

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
sakurai-youhei and kibanamachine authored May 9, 2024
1 parent cc21a1a commit 50d6748
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1389,11 +1389,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'core.euiDatePopoverContent.nowTabButtonEnd',
{ defaultMessage: 'Set end date and time to now' }
),
'euiAbsoluteTab.dateFormatError': ({ dateFormat }: EuiValues) =>
i18n.translate('core.euiAbsoluteTab.dateFormatError', {
defaultMessage: 'Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp.',
values: { dateFormat },
}),
'euiAbsoluteTab.dateFormatError': ({ dateFormat }: EuiValues) => (
<FormattedMessage
id="core.euiAbsoluteTab.dateFormatError"
defaultMessage="Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp."
values={{ dateFormat }}
/>
),
'euiRelativeTab.fullDescription': ({ unit }: EuiValues) =>
i18n.translate('core.euiRelativeTab.fullDescription', {
defaultMessage: 'The unit is changeable. Currently set to {unit}.',
Expand Down

0 comments on commit 50d6748

Please sign in to comment.