diff --git a/package.json b/package.json index fc86ac5..1cedb6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tiny-components/datepicker", - "version": "0.2.0", + "version": "0.2.1", "description": "Datepicker for Desktop and Mobile", "repository": { "type": "git", diff --git a/src/mixin.js b/src/mixin.js index a04225e..bd7a461 100644 --- a/src/mixin.js +++ b/src/mixin.js @@ -69,16 +69,6 @@ export default { this.createWeeksAndDays() }, - /** - * - * - */ - onBeforeUpdate() { - store.trigger(this.state.namespace + 'change', { - date: this.state.date - }) - }, - /** * create weeks and days * @@ -138,6 +128,11 @@ export default { } this.state.date = day + + store.trigger(this.state.namespace + 'change', { + date: this.state.date.clone() + }) + this.update() },