This commit is contained in:
61
ayanova/src/components/gzdateandtimepicker.vue
Normal file
61
ayanova/src/components/gzdateandtimepicker.vue
Normal file
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-menu
|
||||
ref="menu"
|
||||
v-model="menu2"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
:return-value.sync="time"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
v-model="time"
|
||||
label="Picker in menu"
|
||||
prepend-icon="fa-calendar-alt"
|
||||
@click:prepend="sproing('CLICK DATE')"
|
||||
append-icon="fa-clock"
|
||||
@click:append="sproing('CLICK TIME')"
|
||||
readonly
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-time-picker
|
||||
v-if="menu2"
|
||||
v-bind:value="value"
|
||||
v-on:input="$emit('input', $event.target.value)"
|
||||
></v-time-picker>
|
||||
</v-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
//https://stackoverflow.com/questions/54575541/vuetify-timepicker-return-value-to-model
|
||||
export default {
|
||||
props: {
|
||||
value: String,
|
||||
formatDate: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: null,
|
||||
menu2: false,
|
||||
modal2: false
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
sproing: function(msg) {
|
||||
alert(msg);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user