From 693c204e215d4e58337e101825bed260883685fc Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 4 Sep 2019 08:42:01 +0200 Subject: [PATCH] Calendar last day selection fixed #1465 --- front/core/components/calendar/index.js | 2 +- modules/agency/front/location/calendar.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js index e7c925e60..23c0450fa 100644 --- a/front/core/components/calendar/index.js +++ b/front/core/components/calendar/index.js @@ -67,7 +67,7 @@ export default class Calendar extends Component { this.addEvent(event); }); - if (value.length && this.defaultDate) { + if (this.defaultDate) { this.repaint(); this.checkSize(); } diff --git a/modules/agency/front/location/calendar.js b/modules/agency/front/location/calendar.js index 802a9946e..d9226c221 100644 --- a/modules/agency/front/location/calendar.js +++ b/modules/agency/front/location/calendar.js @@ -75,7 +75,7 @@ class Controller { if (exists > -1) totalEvents++; }); - if (totalEvents > (values.length / 2)) + if (totalEvents == 1 || totalEvents > (values.length / 2)) this.removeEvents(calendar, values); else this.insertEvents(calendar, values);