--- id: 'Date picker' section: components subsection: date-and-time cssPrefix: pf-v5-c-date-picker ---import './DatePicker.css' ## Examples ### Basic ```html
``` ### Helper text ```html
Select a date.
``` ### Invalid ```html
Invalid date
``` ### Expanded ```html
Calendar
``` ### Custom width input ```html
``` ### Custom width input based on number of characters ```html
``` ## Documentation ### Usage | Class | Applied to | Outcome | | -- | -- | -- | | `.pf-v5-c-date-picker` | `
` | Initiates the date picker component. **Required** | | `.pf-v5-c-date-picker__input` | `
` | Initiates the date picker input container. **Required** | | `.pf-v5-c-date-picker__helper-text` | `
` | Initiates the date picker helper text. | | `.pf-v5-c-date-picker__calendar` | `
` | Initiates an optional date picker calendar container. **Note:** Required in the react date picker component. | | `.pf-m-top` | `.pf-v5-c-date-picker` | Modifies to display the calendar above the date picker. | | `.pf-m-align-right` | `.pf-v5-c-date-picker__calendar` | Modifies the calendar to align the calendar to the right edge of the date picker. | | `.pf-m-static` | `.pf-v5-c-date-picker__calendar` | Modifies the calendar to be statically positioned to support custom positioning. |