Compare commits

...

2 Commits
v0.3.0 ... main

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

@ -68,6 +68,7 @@ export default {
store.on('update-props', (data) => { store.on('update-props', (data) => {
this.state.date = dayjs(this.props.date) this.state.date = dayjs(this.props.date)
this.update()
}) })
this.createWeeksAndDays() this.createWeeksAndDays()
@ -150,6 +151,10 @@ export default {
this.state.date = this.state.date.month(event.target.value) this.state.date = this.state.date.month(event.target.value)
this.createWeeksAndDays() this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update() this.update()
}, },
@ -163,6 +168,10 @@ export default {
this.state.date = this.state.date.year(event.target.value) this.state.date = this.state.date.year(event.target.value)
this.createWeeksAndDays() this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update() this.update()
}, },
@ -177,6 +186,10 @@ export default {
this.state.date = this.state.date.subtract(1, 'month') this.state.date = this.state.date.subtract(1, 'month')
this.createWeeksAndDays() this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update() this.update()
}, },
@ -191,6 +204,10 @@ export default {
this.state.date = this.state.date.add(1, 'month') this.state.date = this.state.date.add(1, 'month')
this.createWeeksAndDays() this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update() this.update()
}, },
@ -204,6 +221,10 @@ export default {
this.state.date = this.state.date.subtract(1, 'year') this.state.date = this.state.date.subtract(1, 'year')
this.createWeeksAndDays() this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update() this.update()
}, },
@ -217,6 +238,10 @@ export default {
this.state.date = this.state.date.add(1, 'year') this.state.date = this.state.date.add(1, 'year')
this.createWeeksAndDays() this.createWeeksAndDays()
store.trigger(this.state.namespace + 'change', {
date: this.state.date.clone()
})
this.update() this.update()
}, },

Loading…
Cancel
Save