add events for each selector

main v0.3.1
HerrHase 4 weeks ago
parent 451e380dd7
commit 20fd9baced

@ -1,6 +1,6 @@
{
"name": "@tiny-components/datepicker",
"version": "0.3.0",
"version": "0.3.1",
"description": "Datepicker for Desktop and Mobile",
"repository": {
"type": "git",

@ -150,6 +150,10 @@ export default {
this.state.date = this.state.date.month(event.target.value)
this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update()
},
@ -163,6 +167,10 @@ export default {
this.state.date = this.state.date.year(event.target.value)
this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update()
},
@ -177,6 +185,10 @@ export default {
this.state.date = this.state.date.subtract(1, 'month')
this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update()
},
@ -191,6 +203,10 @@ export default {
this.state.date = this.state.date.add(1, 'month')
this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update()
},
@ -204,6 +220,10 @@ export default {
this.state.date = this.state.date.subtract(1, 'year')
this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update()
},
@ -217,6 +237,10 @@ export default {
this.state.date = this.state.date.add(1, 'year')
this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update()
},

Loading…
Cancel
Save