fix end_datetime issue

This commit is contained in:
lesion 2021-10-22 12:43:03 +02:00
parent c287fdef1a
commit a9e38fad3c
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -34,7 +34,6 @@
//- When //- When
DateInput(v-model='date' :event='event') DateInput(v-model='date' :event='event')
//- Description //- Description
v-col.px-0(cols='12') v-col.px-0(cols='12')
Editor.px-3.ma-0( Editor.px-3.ma-0(
@ -127,7 +126,7 @@ export default {
page: { month, year }, page: { month, year },
fileList: [], fileList: [],
id: null, id: null,
date: { from: 0, due: 0, recurrent: null }, date: { from: null, due: null, recurrent: null },
edit: false, edit: false,
loading: false, loading: false,
disableAddress: false disableAddress: false
@ -181,7 +180,7 @@ export default {
formData.append('description', this.event.description) formData.append('description', this.event.description)
formData.append('multidate', !!this.date.multidate) formData.append('multidate', !!this.date.multidate)
formData.append('start_datetime', dayjs(this.date.from).unix()) formData.append('start_datetime', dayjs(this.date.from).unix())
formData.append('end_datetime', this.date.due && dayjs(this.date.due).unix()) formData.append('end_datetime', this.date.due ? dayjs(this.date.due).unix() : this.date.from.add(2, 'hour').unix())
if (this.edit) { if (this.edit) {
formData.append('id', this.event.id) formData.append('id', this.event.id)