Feat(Home): month selector
This commit is contained in:
parent
f9c1e6483f
commit
c4dbbeaa82
@ -4,6 +4,8 @@
|
|||||||
<div class="analysis" v-if="datas_present">
|
<div class="analysis" v-if="datas_present">
|
||||||
<b-container fluid>
|
<b-container fluid>
|
||||||
<b-row class="date-selector">
|
<b-row class="date-selector">
|
||||||
|
<b-form-input type="month" value="2018-12" @input="set_month"></b-form-input>
|
||||||
|
<!--
|
||||||
<b-col sm="1"><label for="start"> Entre </label> </b-col>
|
<b-col sm="1"><label for="start"> Entre </label> </b-col>
|
||||||
<b-col sm="3">
|
<b-col sm="3">
|
||||||
<b-form-input id="start" type="date" :value="start" @input="set_start"></b-form-input>
|
<b-form-input id="start" type="date" :value="start" @input="set_start"></b-form-input>
|
||||||
@ -12,6 +14,7 @@
|
|||||||
<b-col sm="3">
|
<b-col sm="3">
|
||||||
<b-form-input id="end" type="date" :value="end" @input="set_end"></b-form-input>
|
<b-form-input id="end" type="date" :value="end" @input="set_end"></b-form-input>
|
||||||
</b-col>
|
</b-col>
|
||||||
|
-->
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
|
|
||||||
@ -53,6 +56,7 @@
|
|||||||
import { mapGetters, mapActions } from 'vuex'
|
import { mapGetters, mapActions } from 'vuex'
|
||||||
import box from '../components/box'
|
import box from '../components/box'
|
||||||
import tagsComparison from '../components/tags_comparison'
|
import tagsComparison from '../components/tags_comparison'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'home',
|
name: 'home',
|
||||||
@ -107,10 +111,12 @@ export default {
|
|||||||
'set_start',
|
'set_start',
|
||||||
'set_end'
|
'set_end'
|
||||||
]),
|
]),
|
||||||
update_start (e) {
|
|
||||||
},
|
|
||||||
set_tags_filter (tagnames) {
|
set_tags_filter (tagnames) {
|
||||||
this.tags_filter = tagnames
|
this.tags_filter = tagnames
|
||||||
|
},
|
||||||
|
set_month (month) {
|
||||||
|
this.set_start(moment(month).startOf("month").toDate())
|
||||||
|
this.set_end(moment(month).endOf("month").toDate())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user