From 451e380dd788c57325b6a08eccd28a10fff053db Mon Sep 17 00:00:00 2001 From: HerrHase Date: Wed, 5 Mar 2025 17:01:00 +0100 Subject: [PATCH] add event for update props --- package.json | 2 +- src/mixin.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1cedb6f..4e7ca18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tiny-components/datepicker", - "version": "0.2.1", + "version": "0.3.0", "description": "Datepicker for Desktop and Mobile", "repository": { "type": "git", diff --git a/src/mixin.js b/src/mixin.js index bd7a461..e9fb6f5 100644 --- a/src/mixin.js +++ b/src/mixin.js @@ -66,6 +66,10 @@ export default { this.state.date = dayjs(data.date) }) + store.on('update-props', (data) => { + this.state.date = dayjs(this.props.date) + }) + this.createWeeksAndDays() },