---
id: date-input-container
title: DateInputContainer
---

# DateInputContainer

## How to use

<code src="@digigov/ui/src/form/DateInputContainer/__stories__/Default.tsx" />

### For multiple questions

If you’re asking more than one question on the page, you can display the question's title using `<FieldsetLegend size="sm">`.

<code src="@digigov/ui/src/form/DateInputContainer/__stories__/MultipleQuestions.tsx" />

### Error message

If you’re highlighting the whole date, style all the fields like this:

<code src="@digigov/ui/src/form/DateInputContainer/__stories__/WithErrorMessage.tsx" />

If you’re highlighting just one field - either the day, month or year - only style the field that has an error. The error message must say which field has an error, like this:

<code src="@digigov/ui/src/form/DateInputContainer/__stories__/WithErrorMessageForSingleField.tsx" />

## API

See below for a complete reference to all of the props  available to the components mentioned here.

<ComponentProps componentName={["DateInputContainer","DateInputItem"]} /> 
