File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/react-core/src/components/Timestamp Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,15 @@ export const Timestamp: React.FunctionComponent<TimestampProps> = ({
127
127
} ) ;
128
128
const defaultTooltipContent = `${ utcDateString } ${ tooltip ?. suffix ? ' ' + tooltip . suffix : ' UTC' } ` ;
129
129
130
+ const { dateTime, ...propsWithoutDateTime } = props ;
131
+
130
132
const timestamp = (
131
133
< span
132
134
className = { css ( styles . timestamp , tooltip && styles . modifiers . helpText , className ) }
133
135
{ ...( tooltip && { tabIndex : 0 } ) }
134
- { ...props }
136
+ { ...propsWithoutDateTime }
135
137
>
136
- < time className = "pf-c-timestamp__text" dateTime = { props . dateTime || new Date ( date ) . toISOString ( ) } >
138
+ < time className = "pf-c-timestamp__text" dateTime = { dateTime || new Date ( date ) . toISOString ( ) } >
137
139
{ ! children ? defaultDisplay : children }
138
140
</ time >
139
141
</ span >
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ exports[`Matches snapshot 1`] = `
4
4
<DocumentFragment >
5
5
<span
6
6
class = " pf-c-timestamp"
7
- datetime = " 2022-01-01T00:00:00.000Z"
8
7
>
9
8
<time
10
9
class = " pf-c-timestamp__text"
You can’t perform that action at this time.
0 commit comments