add a day when end_datetime < start_datetime

This commit is contained in:
lesion
2019-07-13 22:51:45 +02:00
parent 5d45c12aaa
commit 2b658bb96b
2 changed files with 4 additions and 0 deletions

View File

@@ -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()