vuetify-date
v0.1.11
Published
Simple Date component to vuetify.
Downloads
27
Maintainers
Readme
vuetify-date
This component works with vuetify.
input:
- 14/05/2019 (Locale allows you to define others date formats).
v-model: (milliseconds) 1557802800000
if you want a datetime component, please, try this:
Dependency
- VueJS
- Vuetify
- moment
Links
Install:
$ npm install vuetify-date --save
Register component:
1- Create a src/modules/vuetify-date.js file with the following content:
import Vue from "vue";
import VuetifyDate from "vuetify-date";
Vue.use(VuetifyDate);
export default VuetifyDate;
2- Add to src/mains.js file:
import "./modules/vuetify-date.js";
Parent component:
<template>
<div>
<vuetify-date v-model="value" v-bind:label="label" v-bind:options="options"/>
v-model parent: {{ value }}
</div>
</template>
<script>
export default {
data: () => ({
value: "1557802800000",
label: "Date",
options: {
locale: "pt-BR",
format: "DD/MM/YYYY", - Date format only. Do not include the time format here.
clearable: true
}
})
};
</script>