add a day when end_datetime < start_datetime
This commit is contained in:
@@ -286,6 +286,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
start_datetime = moment(this.date).set('hour', start_hour).set('minute', start_minute)
|
start_datetime = moment(this.date).set('hour', start_hour).set('minute', start_minute)
|
||||||
end_datetime = moment(this.date).set('hour', end_hour).set('minute', end_minute)
|
end_datetime = moment(this.date).set('hour', end_hour).set('minute', end_minute)
|
||||||
|
if (end_hour<start_hour) {
|
||||||
|
end_datetime = end_datetime.add(1, 'day')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ const userController = {
|
|||||||
|
|
||||||
const eventDetails = {
|
const eventDetails = {
|
||||||
title: body.title,
|
title: body.title,
|
||||||
|
// remove html tag
|
||||||
description: body.description ? body.description.replace(/(<([^>]+)>)/ig, '') : '',
|
description: body.description ? body.description.replace(/(<([^>]+)>)/ig, '') : '',
|
||||||
multidate: body.multidate,
|
multidate: body.multidate,
|
||||||
start_datetime: body.start_datetime,
|
start_datetime: body.start_datetime,
|
||||||
|
|||||||
Reference in New Issue
Block a user