From e2b833de67c51d66ca55c975621ca09e1a91e150 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 20 Oct 2022 15:30:32 -0600 Subject: [PATCH] Calendar: Allow any value for minutes, lets full day events end at 23:59 --- calendar/js/app.ts | 13 +++++++------ calendar/templates/default/add.xet | 2 +- calendar/templates/default/edit.xet | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/calendar/js/app.ts b/calendar/js/app.ts index 74d77bb6ff..f27b6cecec 100644 --- a/calendar/js/app.ts +++ b/calendar/js/app.ts @@ -56,6 +56,7 @@ import Sortable from 'sortablejs/modular/sortable.complete.esm.js'; import {tapAndSwipe} from "../../api/js/tapandswipe"; import {CalendarOwner} from "./CalendarOwner"; import {et2_IInput} from "../../api/js/etemplate/et2_core_interfaces"; +import {Et2DateTime} from "../../api/js/etemplate/Et2Date/Et2DateTime"; /** * UI for calendar @@ -1455,12 +1456,12 @@ export class CalendarApp extends EgwApp */ set_enddate_visibility() { - var duration = this.et2.getWidgetById('duration'); - var start = this.et2.getWidgetById('start'); - var end = this.et2.getWidgetById('end'); - var content = this.et2.getArrayMgr('content').data; + let duration = this.et2.getWidgetById('duration'); + let start = this.et2.getWidgetById('start'); + let end = this.et2.getWidgetById('end'); + let content = this.et2.getArrayMgr('content').data; - if (typeof duration != 'undefined' && typeof end != 'undefined') + if(duration != null && end != null) { end.set_disabled(duration.get_value()!==''); @@ -3446,7 +3447,7 @@ export class CalendarApp extends EgwApp } return label; }; - if (typeof content['alarm'][1]['default'] == 'undefined') + if(content['alarm'] && typeof content['alarm'] && typeof content['alarm'][1]['default'] == 'undefined') { // user deleted alarm --> nothing to do } diff --git a/calendar/templates/default/add.xet b/calendar/templates/default/add.xet index a338424f4a..fd327906ab 100644 --- a/calendar/templates/default/add.xet +++ b/calendar/templates/default/add.xet @@ -24,7 +24,7 @@ - + diff --git a/calendar/templates/default/edit.xet b/calendar/templates/default/edit.xet index d9a18f2795..3cdae53538 100644 --- a/calendar/templates/default/edit.xet +++ b/calendar/templates/default/edit.xet @@ -221,7 +221,7 @@ - +