diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-12-02 08:10:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-02 08:10:51 +0100 |
commit | 6380a38de4933df5e05831497b98163a96807b72 (patch) | |
tree | 46e6e30e7bee3d023e4692ababd996894a8409e3 /apps | |
parent | 114970676503ff2cfefa9547b06b00abc47cfa73 (diff) | |
parent | 3b30b2ff16143c5710ee0be6784e50f84238f81d (diff) | |
download | nextcloud-server-6380a38de4933df5e05831497b98163a96807b72.tar.gz nextcloud-server-6380a38de4933df5e05831497b98163a96807b72.zip |
Merge pull request #41967 from nextcloud/fix/dav/single-day-ooo-stable28
[stable28] fix(dav): Allow single-day out of office
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/src/components/AbsenceForm.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dav/src/components/AbsenceForm.vue b/apps/dav/src/components/AbsenceForm.vue index aedd7867e40..f43fb889b9e 100644 --- a/apps/dav/src/components/AbsenceForm.vue +++ b/apps/dav/src/components/AbsenceForm.vue @@ -90,11 +90,17 @@ export default { * @return {boolean} */ valid() { + // Translate the two date objects to midnight for an accurate comparison + const firstDay = new Date(this.firstDay?.getTime()) + const lastDay = new Date(this.lastDay?.getTime()) + firstDay?.setHours(0, 0, 0, 0) + lastDay?.setHours(0, 0, 0, 0) + return !!this.firstDay && !!this.lastDay && !!this.status && !!this.message - && this.lastDay > this.firstDay + && lastDay >= firstDay }, }, methods: { |