Prep for a new auto-complete, and enable foreign currency select.

This commit is contained in:
James Cole
2020-03-11 10:25:38 +01:00
parent 9f8bf6d495
commit f375934b41
11 changed files with 130 additions and 77 deletions

View File

@@ -24,17 +24,28 @@
{{ $t('firefly.date') }}
</div>
<div class="col-sm-12">
<input
type="date"
class="form-control"
name="date[]"
v-bind:title="$t('firefly.date')"
ref="date"
autocomplete="off"
:disabled="index > 0"
v-bind:placeholder="$t('firefly.date')"
:value="value" @input="handleInput"
>
<div class="input-group">
<input
type="date"
class="form-control"
name="date[]"
v-bind:title="$t('firefly.date')"
ref="date"
autocomplete="off"
:disabled="index > 0"
v-bind:placeholder="$t('firefly.date')"
:value="value" @input="handleInput"
>
<span class="input-group-btn">
<button
tabIndex="-1"
v-on:click="clearDate"
class="btn btn-default"
type="button"><i class="fa fa-trash-o"></i></button>
</span>
</div>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
</ul>
@@ -52,7 +63,15 @@
},
handleInput(e) {
this.$emit('input', this.$refs.date.value);
}
},
clearDate: function () {
//props.value = '';
this.name = '';
this.$refs.date.value = '';
this.$emit('input', this.$refs.date.value);
// some event?
this.$emit('clear:date')
},
}
}
</script>