Optional
autoIf true, the input element will be focused during the first mount. Use with caution as it can cause accessibility issues.
Optional
calendarAria label for calendar button.
Optional
childrenOptional
classOptional CSS class name.
Optional
colorThe color of the component. It supports those theme colors that make sense for this component.
Optional
customUsed for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".
Optional
customUse this if you want to bypasss internal focus handling
Optional
customCustom translations for screen reader texts.
Optional
defaultThe default value of the input element.
Optional
disabledDisables the DatePicker component.
Optional
disableDisables future dates locally. Set to false and use maxDate
to align with a specific timezone.
Optional
disableDisables past dates locally. Set to false and use minDate
to align with a specific timezone.
Optional
disableKeeps the calendar within the DOM hierarchy of the parent component if true.
Optional
endPlace an icon to end the text field with
Optional
errorIndicates if the component is in an error state, applying error-specific styling for validation feedback.
Optional
errorCustom error text that triggers an error state, overriding the default validation message.
Optional
FormProps applied to the FormHelperText element.
Optional
fullExpands the input field to fill the width of its parent container.
Optional
hasDisplays Cancel and Ok buttons; onAccept
triggers only on Ok.
Optional
hasShows week numbers adjacent to dates when set to true.
Optional
helperAdditional descriptive text shown below the input field.
ID for the input field, enhancing accessibility by linking label and helperText.
Optional
InputProps applied to the InputLabel element.
Optional
inputAttributes applied to the input element.
Optional
InputProps applied to the Input element. Depending on the variant prop value, it will be a FilledInput, OutlinedInput, or Input component.
Optional
inputref attribute that will be set on the input element
Optional
isDetermines if the calendar is open.
Optional
isDisplays a loading skeleton instead of the DatePicker when true.
Optional
isSet this to true if the component is used as search field.
Optional
journeyDescribes the journey direction, aiding screen reader interpretation.
Text label for the DatePicker, visible to users.
Language used for localization and date formatting.
Optional
marginIf dense or normal, will adjust vertical spacing of this and contained components.
Optional
maxDisables all dates after this date, expected in 'yyyy-MM-dd' format.
Optional
maxMaximum number of rows to display when multiline option is set to true.
Optional
minDisables all dates before this date, expected in 'yyyy-MM-dd' format.
Optional
minMinimum number of rows to display when multiline option is set to true.
Optional
multilineIf true, a textarea element will be rendered instead of an input.
Optional
numericIf the input is used for numeric data. Displays numeric keyboard on mobile devices.
Optional
onFunction called when the input value passes validation.
Optional
onFunction called when the input field value changes.
Optional
onClick listener for the text field wrapper. IMPORTANT! Only use in special circumstances, e.g. in TravellerField component
Optional
onFunction called when a new validation error occurs.
Optional
onCallback when field is focused.
Optional
onOptional
onOptional
onOptional
onOptional
onFunction to run on open calendar button.
Optional
placeholderThe short hint displayed in the input before the user enters a value.
Optional
requiredIf true, the label is displayed as required and the input element` will be required.
Optional
roundedMakes the input rounded
Optional
rowsNumber of rows to display when multiline option is set to true.
Optional
secondaryAllows selection of month or year directly if set.
Optional
selectRender a Select element while passing the Input element to Select as input parameter. If this option is set you must pass the options of the select as children.
Optional
SelectProps applied to the Select element.
Optional
showDetermines whether to display the Calendar IconButton within the DateField.
Optional
skeletonCustom styles for Skeleton.
Optional
startPlace an icon to start the text field with
Optional
sxThe system prop that allows defining system overrides as well as additional CSS styles.
Optional
timeTimezone setting for the DatePicker, defaults to "Europe/Stockholm".
Optional
translationProvide local translations to be used in TextField
Optional
typeType of the input element. It should be a valid HTML5 input type.
Optional
validIf true, a green checkmark icon will be displayed inside the text field.
The current date value of the DatePicker, in 'yyyy-MM-dd' format.
Optional
variantThe variant to use.
Optional
zZ-index for calendar popper/drawer.
TODO: Use explicit types via HTMLInputElement["autocomplete"] after upgrading to Typescript 5.1