EventCalendar
Calendario que marca los días con salida disponible. Es el que usa el buscador de paquetes.
import { EventCalendar } from '#LibComponents/react/atomic/eventcalendar/calendar.component';<EventCalendar name="salida" events={salidas} onChange={fn} />Props del tipo del componente
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
autoFocus | boolean | no | — | |
calendarEvents | T[] | sí | — | |
className | string | no | — | |
classOpts | {
classFocused?: string;
classBGColor?: string;
classDay?: string;
} | no | — | |
children | ReactNode | no | — | |
customErrorMessage | string | no | — | |
dayMapper | StaticFields[] | no | — | |
disabled | boolean | no | — | |
disableBefore | boolean | no | — | |
disableWithoutEvent | boolean | no | — | |
endDateValue | string | Date | no | — | |
endYear | number | no | — | |
endDate | string | Date | no | — | |
errorMark | boolean | no | — | |
error | ErrorsType | null | no | — | |
formatter | (d: any) => Date | no | — | |
forceUpdate | boolean | no | — | |
hasToggle | boolean | no | — | |
icon | string | no | — | |
iconPosition | 'left' | 'right' | no | — | |
initial | boolean | no | — | |
initDate | string | Date | no | — | |
initYear | number | no | — | |
hasError | boolean | no | — | |
inline | boolean | no | — | |
label | string | no | — | |
lang | string | no | — | |
name | string | sí | — | |
placeholder | string | no | — | |
positionOpts | {
cssProp?: string;
cssPropValues?: string[];
} | no | — | |
onChange | (inputValue: StaticFields) => void | sí | — | |
onDayClick | (selDay: StaticFields | number | undefined) => void | no | — | |
onFocus | (name: string) => void | no | — | |
onFormError | (error: ErrorOnField) => void | no | — | |
renderDay | (v: Date, isHL?: T) => ReactNode | no | — | |
required | boolean | no | — | |
reverseOrder | boolean | no | — | |
startDateValue | string | Date | no | — | |
showShortcuts | boolean | no | — | |
tabIndex | number | no | — | |
validPatterns | RegExp[] | no | — |
Ojo
- El helper de la vista previa no acepta props, así que aquí solo se ve la configuración por defecto (la variante `Shorcuts` de la story anterior pasaba `shortcuts`, que el helper ignoraba).