0.1.0 • Published 5 months ago

@atmgrupomaggioli/iris-date v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

iris-date

Properties

PropertyAttributeDescriptionTypeDefault
disableddisabledIndica si el campo está deshabilitado.booleanfalse
endDateend-dateFecha máxima permitida. 📌 Ejemplo de uso: tsx <iris-date startDate="20/03/2025" />stringundefined
label (required)labelEtiqueta del componente.stringundefined
namename Nombre del date - Se usa para identificar el date en formularios.stringundefined
requiredrequiredIndica si el campo es requerido.booleanfalse
rulesrulesLista de reglas de validación para el campo. Se pueden definir múltiples reglas para personalizar la validación.Rule[]undefined
startDatestart-dateFecha mínima permitida. 📌 Ejemplo de uso: tsx <iris-date startDate="01/03/2025" />stringundefined
tooltiptooltipTexto del tooltipstring \| string[]undefined
typetypeModo del calendario (single, multiple, range)."multiple" \| "range" \| "single"'single'
valuevalueValor inicial del componente. 📌 Ejemplo de uso: tsx <iris-date value="06/03/2025" />string \| string[]undefined
widthwidthEspecifica el tamaño del campo.string'100%'

Events

EventDescriptionType
isFocusedEvento que se emite cuando el componente está enfocado.CustomEvent<boolean>
valueChangeEvento que se emite cuando cambia el valor del componente.CustomEvent<string \| string[]>

Methods

clear() => Promise<void>

Borra el valor del campo de fecha utilizando la instancia de Flatpickr.

Returns

Type: Promise<void>

getValue() => Promise<string | string[]>

Devuelve el valor seleccionado.

Returns

Type: Promise<string | string[]>

setValue(newValue: string | string[] | undefined) => Promise<void>

Establece el valor del date.

Parameters

NameTypeDescription
newValuestring \| string[]El valor de la fecha a establecer. - Para 'single': string en formato 'dd/mm/yyyy' o undefined. - Para 'multiple' / 'range': string[] de fechas en formato 'dd/mm/yyyy' o undefined.

Returns

Type: Promise<void>

validate() => Promise<void>

Returns

Type: Promise<void>


Built with StencilJS