Change-Id: I6f6442bcd76f2d4e8ab293646cd8bfadd30130ebmr9.1.1
parent
2dd8cce49b
commit
88b66464c6
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<csc-input
|
||||
:value="value"
|
||||
v-bind="$attrs"
|
||||
@click="$refs.popupTime.show()"
|
||||
@input="$emit('input', $event)"
|
||||
>
|
||||
<template
|
||||
v-slot:prepend
|
||||
>
|
||||
<q-btn
|
||||
icon="date_range"
|
||||
color="primary"
|
||||
dense
|
||||
flat
|
||||
>
|
||||
<q-popup-proxy
|
||||
ref="popupTime"
|
||||
>
|
||||
<q-date
|
||||
:value="value"
|
||||
mask="YYYY-MM-DD"
|
||||
color="primary"
|
||||
@input="$emit('input', $event); $refs.popupTime.hide()"
|
||||
/>
|
||||
</q-popup-proxy>
|
||||
</q-btn>
|
||||
</template>
|
||||
</csc-input>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CscInput from 'components/form/CscInput'
|
||||
export default {
|
||||
name: 'CscInputDate',
|
||||
components: { CscInput },
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: undefined
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<q-toolbar>
|
||||
<q-space />
|
||||
<csc-input-date
|
||||
v-model="value.from"
|
||||
class="q-mr-sm"
|
||||
dense
|
||||
clearable
|
||||
label="From"
|
||||
:disable="loading"
|
||||
@input="inputFrom"
|
||||
/>
|
||||
<csc-input-date
|
||||
v-model="value.to"
|
||||
dense
|
||||
clearable
|
||||
label="To"
|
||||
:disable="loading"
|
||||
@input="inputTo"
|
||||
/>
|
||||
<q-space />
|
||||
</q-toolbar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CscInputDate from 'components/form/CscInputDate'
|
||||
export default {
|
||||
name: 'CscConversationsFilter',
|
||||
components: {
|
||||
CscInputDate
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
from: '',
|
||||
to: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
disable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
inputFrom (from) {
|
||||
this.$emit('input', {
|
||||
from: from,
|
||||
to: this.value.to
|
||||
})
|
||||
},
|
||||
inputTo (to) {
|
||||
this.$emit('input', {
|
||||
from: this.value.from,
|
||||
to: to
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in new issue