SubComponents
Control
The control subcomponent is required to render the Control of the SingleDatePicker component.
Control API
Notice that there is a difference between using hasError, isDisabled, isReadOnly here or in the parent component. It is not recommended to change this props in the Control subcomponent, because this props can be inherited from the Wrapper. If you use it in the Control subcomponent, you will get the state only in the field.
API
This component extends the native <div> API. That's why the className prop is not included in the table.
align
'start' | 'center' | 'end'
β
alignOffset
number
β
side
'top' | 'right' | 'bottom' | 'left'
β
sideOffset
number
β
defaultOpen
boolean
β
lang
'en' | 'es'
β
isDisabled
boolean
β
hasError
boolean
β
isReadOnly
boolean
β
format
'dd/mm/yyyy' | 'mm/dd/yyyy' | 'yyyy/mm/dd'
β
minDate
string
β
maxDate
string
β
date
string
β
defaultDate
string
β
onDateSelection
(e: SingleDatePickerSelectionEventType) => void;
β
side
Controls the side the menu of the DatePicker is rendered from, always based on the trigger. Will be reversed when collisions occur automatically.
onDateSelection
Triggered when a date selection is done, returning an event. This is used for the controlled approach.
HelpText
The HelpText subcomponent extends the SDS HelpText component. See for reference: HelpText
Label
The Label subcomponent extends the SDS label component. See for reference: Label
Last updated