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