vuetify-simple-date
v2.0.0
Published
Simple Date component to vuetify.
Downloads
6
Maintainers
Readme
vuetify-simple-date
If you use Vuejs with Vuetify and you need a component to input mask dates working in milliseconds. Maybe it can help you.
input:
- 14/05/2019
v-model: (milliseconds) 1557802800000
if you want a milliseconds datetime picker component, you can try this:
Links
Install:
$ npm install vuetify-simple-date --save
Register component:
1- Create a src/plugins/vuetify-simple-date.js file with:
import Vue from "vue";
import VuetifySimpleDate from "vuetify-simple-date";
Vue.use(VuetifySimpleDate);
export default VuetifySimpleDate;
2- Add to src/mains.js file:
import "./plugins/vuetify-simple-date.js";
Parent component:
<template>
<div>
<vuetify-simple-date v-model="value" v-bind:label="label" v-bind:options="options" />
Parent v-model: {{ value }} milliseconds
</div>
</template>
<script>
export default {
data: () => ({
value: 1569717750000,
label: "Date yyyy-mm-dd hh:mm:ss",
// v-text-field properties
properties: {
clearable: true,
readonly: false,
outlined: true,
},
options: {
format: "YYYY-MM-DD", // or other formats. YYYY-MM-DD HH:mm:ss for example
icon: "mdi-calendar",
errorMessage: "Invalid date"
}
})
};
</script>