2
0
mirror of https://github.com/frappe/books.git synced 2024-12-26 20:30:25 +00:00
books/ui/components/controls/BaseDate.vue
thefalconx33 4cbb99ed2d - Base Input Sizing and Placeholder
- $formModal defaults
2019-08-14 13:18:04 +05:30

37 lines
754 B
Vue

<template>
<div :class="{'form-group': !onlyInput}">
<label v-if="!onlyInput">{{ docfield.label }}</label>
<flat-pickr
class="form-control"
:class="getFormControlSize()"
:placeholder="docfield.placeholder"
:value="value"
:config="config"
@on-change="emitChange"
></flat-pickr>
</div>
</template>
<script>
import flatPickr from 'vue-flatpickr-component';
import Data from './Data';
export default {
extends: Data,
props: ['config'],
components: {
flatPickr
},
methods: {
emitChange(dates, dateString) {
this.$emit('change', dateString);
}
}
};
</script>
<style lang="scss">
@import '~flatpickr/dist/flatpickr.css';
.flat-pickr-input {
background-color: #fff;
}
</style>