summaryrefslogtreecommitdiffstats
path: root/apps/dav/src
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-11-29 08:57:54 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-11-29 14:25:00 +0100
commit84cfbe6b1966943e7df04afc3d29ba8a3597cf4c (patch)
treecf564784bab88f10daeec244c8480b9d55971874 /apps/dav/src
parente589232815f5a89f25aa3bd963f307290bad82ba (diff)
downloadnextcloud-server-84cfbe6b1966943e7df04afc3d29ba8a3597cf4c.tar.gz
nextcloud-server-84cfbe6b1966943e7df04afc3d29ba8a3597cf4c.zip
fix(dav): Allow single-day out of office
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/src')
-rw-r--r--apps/dav/src/components/AbsenceForm.vue8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dav/src/components/AbsenceForm.vue b/apps/dav/src/components/AbsenceForm.vue
index 500004b755a..6fb1c4ce1fd 100644
--- a/apps/dav/src/components/AbsenceForm.vue
+++ b/apps/dav/src/components/AbsenceForm.vue
@@ -89,11 +89,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: {