Merge pull request #41967 from nextcloud/fix/dav/single-day-ooo-stable28

[stable28] fix(dav): Allow single-day out of office
This commit is contained in:
Joas Schilling 2023-12-02 08:10:51 +01:00 committed by GitHub
commit 6380a38de4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -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: {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long