From 5b2e713e2f6ddd14c33da9b426a6aa96dd83d3f7 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 13 Apr 2021 17:35:44 +0200 Subject: [PATCH] Hide time selection for all day events --- www/calendar/inner.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/www/calendar/inner.js b/www/calendar/inner.js index 196ea510a..6b9f95685 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -891,6 +891,31 @@ Messages.calendar_allDay = "All day"; } var isUpdate = Boolean($el.find('#tui-full-calendar-schedule-title').val()); if (!isUpdate) { $el.find('.tui-full-calendar-dropdown-menu li').first().click(); } + + var $cbox = $el.find('#tui-full-calendar-schedule-allday'); + var $start = $el.find('.tui-full-calendar-section-start-date'); + var $dash = $el.find('.tui-full-calendar-section-date-dash'); + var $end = $el.find('.tui-full-calendar-section-end-date'); + var allDay = $cbox.is(':checked'); + if (allDay) { + $start.hide(); + $dash.hide(); + $end.hide(); + } + $el.find('.tui-full-calendar-section-allday').click(function () { + setTimeout(function () { + var allDay = $cbox.is(':checked'); + if (allDay) { + $start.hide(); + $dash.hide(); + $end.hide(); + return; + } + $start.show(); + $dash.show(); + $end.show(); + }); + }); }; var onCalendarEditPopup = function (el) { var $el = $(el);