Skip to content

Commit 6380a38

Browse files
Merge pull request #41967 from nextcloud/fix/dav/single-day-ooo-stable28
[stable28] fix(dav): Allow single-day out of office
2 parents 1149706 + 3b30b2f commit 6380a38

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

apps/dav/src/components/AbsenceForm.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,17 @@ export default {
9090
* @return {boolean}
9191
*/
9292
valid() {
93+
// Translate the two date objects to midnight for an accurate comparison
94+
const firstDay = new Date(this.firstDay?.getTime())
95+
const lastDay = new Date(this.lastDay?.getTime())
96+
firstDay?.setHours(0, 0, 0, 0)
97+
lastDay?.setHours(0, 0, 0, 0)
98+
9399
return !!this.firstDay
94100
&& !!this.lastDay
95101
&& !!this.status
96102
&& !!this.message
97-
&& this.lastDay > this.firstDay
103+
&& lastDay >= firstDay
98104
},
99105
},
100106
methods: {

dist/dav-settings-personal-availability.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dav-settings-personal-availability.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)