Look and feel
Customization options
transitions
Control transitions inside the menu. You can define your own or disable them. Datepicker uses a Vue built-in transitions component for transition control. To configure you own, please check the Vue documentation and provide a transition name in the prop
- Type:
Transitions | boolean - Default:
true
ts
interface Transitions {
open?: string;
close?: string;
next?: string;
previous?: string;
menuAppearTop?: string;
menuAppearBottom?: string;
vNext?: string;
vPrevious?: string;
}INFO
openandcloseare added on overlays show/hidenextandpreviousadded when switching months in the calendarmenuAppearTopis added when the menu is open above the input filedmenuAppearBottomis added when the menu is open bellow the input fieldvNextandvPreviousare added when switching months in the calendar in theverticalmode
Code Example
vue
<template>
<VueDatePicker v-model="date" :transitions="false" />
</template>
<script setup>
import { VueDatePicker } from "@vuepic/vue-datepicker";
import {ref } from 'vue';
const date = ref();
</script>dark
Theme switches between the dark and light mode
- Type:
boolean - Default:
false
Code Example
vue
<template>
<VueDatePicker v-model="date" dark />
</template>
<script setup>
import { VueDatePicker } from "@vuepic/vue-datepicker";
import { ref } from 'vue';
const date = ref();
</script>ui
Configure custom classes for a specific element
- Type:
ts
interface UIConfig {
navBtnNext?: string | string[];
navBtnPrev?: string | string[];
calendar?: string | string[];
calendarCell?: string | string[];
menu?: string | string[];
input?: string | string[];
dayClass?: (date: Date, internalModelValue: Date | Date[] | null) => string;
}- Default:
{}
INFO
input- Add a custom class to the input fieldmenu- Add a custom class to the datepicker menu wrappercalendar- Add a custom class to the calendar wrappercalendarCell- Add a custom class to the calendar cell wrappernavBtnNext- Add a custom class on navigation button 'next'navBtnPrev- Add a custom class on navigation button 'previous'dayClass- Add a custom class to the calendar cell depending on the date
Code Example
vue
<template>
<VueDatePicker v-model="date" :ui="{ input: 'my-input-class' }" />
</template>
<script setup>
import { VueDatePicker } from "@vuepic/vue-datepicker";
import { ref } from 'vue';
const date = ref();
</script>