Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-10-02 20:39:19 +0300
committerdartcafe <github@dartcafe.de>2021-10-02 20:39:19 +0300
commit708a47b058a603289a2171715e76019142cde0a8 (patch)
tree044e668db1705dcb017ba78fd9a6d067a0bcf56a /src/js/components/Options
parent507cc86fc0fe0cf4189fc9ad0c5c438a4a3ca184 (diff)
Changed calculation of whole day events.
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Options')
-rw-r--r--src/js/components/Options/OptionItem.vue3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/components/Options/OptionItem.vue b/src/js/components/Options/OptionItem.vue
index 02a2caeb..6bb5f83b 100644
--- a/src/js/components/Options/OptionItem.vue
+++ b/src/js/components/Options/OptionItem.vue
@@ -109,7 +109,8 @@ export default {
// is the duration divisable through 24 hours without rest
// then we have a day long event (one or multiple days)
// In this case we want to suppress the display of any time information
- const dayLongEvent = from.unix() === moment(from).startOf('day').unix() && this.option.duration && this.option.duration % 86400 === 0
+ const dayLongEvent = from.unix() === moment(from).startOf('day').unix() && to.unix() === moment(to).startOf('day').unix() && from.unix() !== to.unix()
+
const dayModifier = dayLongEvent ? 1 : 0
// modified to date, in case of day long events, a second gets substracted
// to set the begin of the to day to the end of the previous date