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;
❌
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