Ir al contenido

co-date-picker

La escritura manual y la selección en el calendario confluyen en el mismo valor YYYY-MM-DD (o null); el calendario es una ayuda, nunca la única entrada. Al hacer clic en el campo se abre el calendario, ArrowDown mueve el foco a la cuadrícula, Enter/clic en un día confirma y cierra, y Escape cierra devolviendo el foco al campo. En viewports estrechos se muestra como hoja inferior.

Ver código
<co-date-picker label="Fecha" value="2026-06-15"></co-date-picker>

Props

PropAtributoTipoDefaultDescripción
clearableclearablebooleantrue
closeOnSelectclose-on-selectbooleantrueClose the popover when a day is selected.
disableddisabledbooleanfalse
disabledDatesdisabled-datesstring | string[] | undefined
disabledDaysOfWeekdisabled-days-of-weeknumber[] | string | undefined
displayFormatdisplay-formatstring'd MMM yyyy'
errorMessageerror-messagestring | undefined
firstDayOfWeekfirst-day-of-weeknumber1
helperTexthelper-textstring | undefined
invalidinvalidbooleanfalse
labellabelstring | undefined
layoutlayout"horizontal" | "vertical"'vertical'Label layout: vertical (label above) or horizontal (label beside)
localelocalestring'es-CO'
maxmaxstring | undefined
minminstring | undefined
mobileBreakpointmobile-breakpointnumber600Max viewport width (px) that renders the calendar as a bottom sheet.
namenamestring | undefined
openopenbooleanfalseWhether the calendar popover is open.
placeholderplaceholderstring | undefined
placementplacement"bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"'bottom-start'Popover placement relative to the field.
readonlyreadonlybooleanfalse
requiredrequiredbooleanfalse
sizesize"lg" | "md" | "s" | "sm"'md'Field size, forwarded to the inner co-date-field.
valuevaluenull | stringnullCommitted value, "YYYY-MM-DD" or null.

Eventos

EventoDetailBubblesCancelableDescripción
coBlurvoid
coChangenull | string
coClearvoid
coClosevoid
coFocusvoid
coInputstring
coInvalid{ raw: string; }
coOpenvoid

Slots

Este componente no expone slots.

CSS Parts

PartDescripción
::part(helper)
::part(label)

CSS Custom Properties

Este componente no expone CSS custom properties.