Skip to content

Import

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

Description

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

There is a corresponding Field.DateOfBirth component.

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

Relevant links

Demos

Empty

Fødselsdato
Code Editor
<Value.DateOfBirth showEmpty />

Placeholder

FødselsdatoThe value was not filled in
Code Editor
<Value.DateOfBirth placeholder="The value was not filled in" />

Value

Fødselsdato16. januar 2023
Code Editor
<Value.DateOfBirth value="2023-01-16" />

Label

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

Label and value

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

Inline

This is before the component 16. januar 2023 This is after the component

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