mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-21 18:51:21 +00:00
Update translations + JS
This commit is contained in:
@@ -19,61 +19,61 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
|
||||
<div class="col-sm-12 text-sm">
|
||||
{{ $t('firefly.date') }}
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group" v-bind:class="{ 'has-error': hasError()}">
|
||||
<div class="col-sm-12 text-sm">
|
||||
{{ $t('firefly.date') }}
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="input-group">
|
||||
<input
|
||||
ref="date"
|
||||
:disabled="index > 0"
|
||||
:value="value"
|
||||
autocomplete="off"
|
||||
class="form-control"
|
||||
name="date[]"
|
||||
|
||||
type="date"
|
||||
v-bind:placeholder="$t('firefly.date')"
|
||||
v-bind:title="$t('firefly.date')" @input="handleInput"
|
||||
>
|
||||
<span class="input-group-btn">
|
||||
<button
|
||||
class="btn btn-default"
|
||||
tabIndex="-1"
|
||||
type="button"
|
||||
v-on:click="clearDate"><i class="fa fa-trash-o"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ul v-for="error in this.error" class="list-unstyled">
|
||||
<li class="text-danger">{{ error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['error', 'value', 'index'],
|
||||
name: "StandardDate",
|
||||
methods: {
|
||||
hasError: function () {
|
||||
return this.error.length > 0;
|
||||
},
|
||||
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')
|
||||
},
|
||||
}
|
||||
}
|
||||
export default {
|
||||
props: ['error', 'value', 'index'],
|
||||
name: "StandardDate",
|
||||
methods: {
|
||||
hasError: function () {
|
||||
return this.error.length > 0;
|
||||
},
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user