Date Field
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Namn | Typ | Beskrivning |
---|---|---|
calendarButtonAriaLabel | string | Aria label for calendar button. |
customAttribute | { attribute: string; value: string |
number } | Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]". |
customCalendarButtonRef | Ref | Use this if you want to bypasss internal focus handling |
customTranslation | DeepPartial | Translation object used for screen reader texts. |
hasAdornments | boolean | Render Calendar and Chevron IconButtons in DateField. Default off in stand alone DateField and deafult on in DatePicker |
isCalendarOpen | boolean | Determines if the calendar is open. |
isLoading | boolean | If true, a loading skeleton will be rendered instead of the component. |
lang * | "sv" |
"en" | Language used for localization and date formatting. |
maxDate | string | Disable all dates after this. Expected in 'yyyy-MM-dd' format. |
minDate | string | Disable all dates before this. Expected in 'yyyy-MM-dd' format. |
onAccept | (value: string) => void | Callback that is fired when input value passes validation |
onChange | (event: ChangeEvent) => void | Callback when field changes. |
onFocus | FocusEventHandler | Callback when field is focused. |
onToggleCalendar | () => void | Function to run on open calendar button. |
timeZone | string | Set timezone for the DateField |
value * | string | DateField value. |
npm install @sj-ab/component-library.ui.date-field
Se dokumentationen av tillgängligheten för komponenterna DatePicker och TextField: