Skip to content

Description

Value.Date is a wrapper component for displaying string values, with user experience tailored for date values.

import { Value } from '@dnb/eufemia/extensions/forms'
render(<Value.Date />)

Demos

Empty

Code Editor
<Value.Date showEmpty />

Placeholder

The value was not filled in
Code Editor
<Value.Date placeholder="The value was not filled in" />

Value

2023-01-16
Code Editor
<Value.Date value="2023-01-16" />

Label

Code Editor
<Value.Date label="Label text" showEmpty />

Label and value

2023-01-16
Code Editor
<Value.Date label="Label text" value="2023-01-16" />

Inline

This is before the component2023-01-16This is after the component

Code Editor
<P>
  This is before the component
  <Value.Date value="2023-01-16" inline />
  This is after the component
</P>