Skip to main content

vueDatePicker

Template

Ejemplo de Input

<template>
<div>
<VueDatePicker
:placeholder="placeholder"
:format="'dd/MM/yyyy hh:mm'"
:model-type="'dd/MM/yyyy hh:mm'"
:disabled="disabled"
:modelValue="value"
:auto-apply="autoApply"
:enable-seconds="enableSeconds"
:is-24="is24"
:time-picker-inline="timePickerInline"
:enable-time-picker="enableTimePicker"
@update:model-value="onDatePicker"
@closed="onClose"
@blur="onBlur"
/>
</div>
</template>

Props

NameTypeDefaultDescription
placeholderString-Placeholder text for the input field.
valueDate | string-The selected date and time value.
customClassString-Additional custom CSS classes for styling the component.
validationsObject-Validation rules for the input field.
disabledBoolean-Disables the input field.
autoApplyBooleanfalseAutomatically applies the selected date and time when changed.
listenChangeBooleanfalseEmits the onDatePicker event on change.
listenFormBoolean-Emits the onDatePicker event when the form is submitted.
enableSecondsBooleanfalseEnables selection of seconds in the time picker.
is24BooleantrueSets the time picker to 24-hour format.
timePickerInlineBooleanfalseDisplays the time picker inline with the date picker.
enableTimePickerBooleantrueEnables the time picker functionality.

Emits

Event NameParametersDescription
update:model-valuevalue: Date / stringEmits when the selected date and time value changes.
setErrorvalue: boolean / nullEmits to set the error status of the component.
onDatePickervalue: DateEmits when a date is selected from the date picker.