fix endhour selection on type changing

This commit is contained in:
les 2021-03-15 22:27:59 +01:00
parent 71287d15d0
commit fcb0e9df75
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -184,11 +184,15 @@ export default {
} else if (value === 'multidate') { } else if (value === 'multidate') {
this.$emit('input', { ...this.value, recurrent: null, multidate: true }) this.$emit('input', { ...this.value, recurrent: null, multidate: true })
} else { } else {
let date = this.value.from let from = this.value.from
if (date && date.start) { if (from && from.start) {
date = date.start from = from.start
} }
this.$emit('input', { ...this.value, from: date, due: date, recurrent: null, multidate: false }) let due = this.value.due
if (due && due.start) {
due = due.start
}
this.$emit('input', { ...this.value, from, due, recurrent: null, multidate: false })
} }
} else if (what === 'frequency') { } else if (what === 'frequency') {
this.$emit('input', { ...this.value, recurrent: { ...this.value.recurrent, frequency: value } }) this.$emit('input', { ...this.value, recurrent: { ...this.value.recurrent, frequency: value } })
@ -216,7 +220,6 @@ export default {
this.$emit('input', { ...this.value, dueHour: false }) this.$emit('input', { ...this.value, dueHour: false })
} }
} else if (what === 'date') { } else if (what === 'date') {
console.error('dentro what date', value)
if (this.value.multidate) { if (this.value.multidate) {
let from = value.start let from = value.start
let due = value.end let due = value.end