Import
import { Value } from '@dnb/eufemia/extensions/forms'render(<Value.Time />)
Description
Value.Time is a read-only component for displaying time values with locale-aware formatting.
The value format is "HH:mm" (e.g. "14:30"), or "HH:mm:ss" (e.g. "14:30:45") when the value includes seconds.
There is a corresponding Field.Time component.
Relevant links
Demos
Label and value
Label text14:30
<Value.Time label="Label text" value="14:30" />
With seconds
Label text14:30:45
<Value.Time label="Label text" value="14:30:45" />
With locale
en-US02:30 PMnb-NO14:30de-DE14:30
<Value.Time label="en-US" value="14:30" locale="en-US" /> <Value.Time label="nb-NO" value="14:30" locale="nb-NO" /> <Value.Time label="de-DE" value="14:30" locale="de-DE" />
Inline
This is before the component 14:30 This is after the component
<P> This is before the component{' '} <Value.Time label="Label text" value="14:30" inline /> This is after the component </P>