Skip to content

Date picker

te-date-picker binds a Date and closes when you click outside of it, which relies on the v-click-outside directive the plugin registers.

Basic

vue
<te-date-picker />

Localised month and day names

vue
<te-date-picker
  placeholder="Selecciona una fecha"
  :days="['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb']"
  :month-names="['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']"
/>

Props

PropTypeDefaultDescription
modelValueDate | nullnullSelected date. Supports v-model.
placeholderstring'Select a date'Placeholder of the trigger input.
disabledbooleanfalseDisables the trigger input.
minDate / maxDateDate | nullnullSelectable range. Also limits the year list and the arrows.
notAllowedDatesDate[][]Individual dates to block.
monthNamesstring[]English monthsTwelve month names.
daysstring[]['Sun', …]Seven weekday labels, starting on Sunday.

Events

EventPayloadDescription
update:modelValueDateA date was picked. The panel closes.

Slots

SlotPropsDescription
triggerReplaces the input that opens the calendar.
iconReplaces the calendar icon.

Released under the MIT License.