Change datepicker format with format
<template>
<datepicker :format="format"></datepicker>
<vs-select v-model="format" class="mt-4 w-full">
<vs-select-item :key="index" :value="option.value" :text="option.text" v-for="(option,index) in formatOptions" />
</vs-select>
</template>
<script>
import Datepicker from 'vuejs-datepicker';
export default {
data() {
return {
format: "d MMMM yyyy",
formatOptions:[
{text: "d MMM yyyy - e.g 12 Feb 2016" , value: "d MMM yyyy" },
{text: "d MMMM yyyy - e.g 12 February 2016", value: "d MMMM yyyy" },
{text: "yyyy-MM-dd - e.g 2016-02-12", value: "yyyy-MM-dd" },
{text: "dsu MMM yyyy - e.g 12th Feb 2016", value: "dsu MMM yyyy" },
{text: "D dsu MMM yyyy - e.g Sat 12th Feb 2016", value: "D dsu MMM yyyy" },
],
}
},
components: {
Datepicker
}
}
</script>