Skip to content

Demos

Empty

Dato

<Field.Date onChange={(value) => console.log('onChange', value)} />

Placeholder

Dato

<Field.Date
placeholder="Enter a date"
onChange={(value) => console.log('onChange', value)}
/>

Label

Label text

<Field.Date
label="Label text"
onChange={(value) => console.log('onChange', value)}
/>

Label and value

Label text

<Field.Date
value="2023-01-16"
label="Label text"
onChange={(value) => console.log('onChange', value)}
/>

Disabled

Label text

<Field.Date
value="2023-01-16"
label="Label text"
onChange={(value) => console.log('onChange', value)}
disabled
/>

Error

This is what is wrong...
Label text

<Field.Date
value="2023-01-16"
label="Label text"
onChange={(value) => console.log('onChange', value)}
error={new FormError('This is what is wrong...')}
/>

Validation - Required

Label text

<Field.Date
value="2023-01-16"
label="Label text"
onChange={(value) => console.log('onChange', value)}
required
/>