diff --git a/package.json b/package.json index 4e7ca18..ce22f9e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/mixin.js b/src/mixin.js index e9fb6f5..448e2ea 100644 --- a/src/mixin.js +++ b/src/mixin.js @@ -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() },