Added forms for Class level, damage multiplier, experience, folder, note, proficiency
This commit is contained in:
52
app/imports/ui/components/global/DatePicker.vue
Normal file
52
app/imports/ui/components/global/DatePicker.vue
Normal file
@@ -0,0 +1,52 @@
|
||||
<template lang="html">
|
||||
<v-menu
|
||||
v-model="menu"
|
||||
:close-on-content-click="false"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
full-width
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
:value="formattedSafeValue"
|
||||
v-bind="$attrs"
|
||||
prepend-icon="event"
|
||||
readonly
|
||||
v-on="on"
|
||||
:loading="loading"
|
||||
:error-messages="errors"
|
||||
@focus="focused = true"
|
||||
@blur="focused = false"
|
||||
box
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker :value="formattedSafeValue" @input="dateInput"></v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SmartInput from '/imports/ui/components/global/SmartInputMixin.js';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
export default {
|
||||
mixins: [SmartInput],
|
||||
data(){return {
|
||||
menu: false,
|
||||
};},
|
||||
methods: {
|
||||
dateInput(e){
|
||||
this.menu = false;
|
||||
this.input(e);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
formattedSafeValue(){
|
||||
return format(this.safeValue, 'YYYY-MM-DD')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
</style>
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
inputValue: this.value,
|
||||
};},
|
||||
props: {
|
||||
value: [String, Number],
|
||||
value: [String, Number, Date],
|
||||
debounceTime: {
|
||||
type: Number,
|
||||
default: 750,
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import Vue from "vue";
|
||||
// Global components
|
||||
import DatePicker from '/imports/ui/components/global/DatePicker.vue';
|
||||
import TextField from '/imports/ui/components/global/TextField.vue';
|
||||
import TextArea from '/imports/ui/components/global/TextArea.vue';
|
||||
import SmartSelect from '/imports/ui/components/global/SmartSelect.vue';
|
||||
|
||||
Vue.component("date-picker", DatePicker);
|
||||
Vue.component("text-field", TextField);
|
||||
Vue.component("text-area", TextArea);
|
||||
Vue.component("smart-select", SmartSelect);
|
||||
|
||||
Reference in New Issue
Block a user