This commit is contained in:
2019-03-05 01:09:28 +00:00
parent ea24d476f6
commit f1a6debdb0
3 changed files with 69 additions and 4 deletions

View 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>