2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

Add Date control

This commit is contained in:
Faris Ansari 2018-06-04 16:30:33 +05:30
parent 966ff39abc
commit d6989ff2dd
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<template>
<div class="form-group">
<label>{{ docfield.label }}</label>
<flat-pickr
:value="value"
class="form-control"
@on-change="emitChange"
>
</flat-pickr>
</div>
</template>
<script>
import flatPickr from 'vue-flatpickr-component';
import Data from './Data';
export default {
extends: Data,
components: {
flatPickr
},
methods: {
emitChange(dates, dateString) {
this.$emit('change', dateString);
}
}
};
</script>
<style lang="scss">
@import "flatpickr/dist/flatpickr.css";
</style>

View File

@ -7,6 +7,7 @@ import Check from './Check';
import Code from './Code';
import Currency from './Currency';
import Data from './Data';
import Date from './Date';
import Float from './Float';
import Link from './Link';
import Select from './Select';
@ -22,6 +23,7 @@ export default {
Code,
Currency,
Data,
Date,
Float,
Link,
Select,