fix(dav): Allow single-day out of office

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2023-11-29 08:57:54 +01:00
parent ed809fd0f6
commit 3b30b2ff16
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8
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