From 058dfc6551620938e3663f85f22e8262bcd16100 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 10 May 2017 13:45:32 -0600 Subject: [PATCH] Fix calendar edit recurrence losing timezone on first load --- api/js/etemplate/et2_widget_selectbox.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index 540df025f2..38d34cd744 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -1363,6 +1363,19 @@ jQuery.extend(et2_selectbox, //(function(){ "use strict"; return delete cache_owner[cache_id]; return this.cached_server_side_options(widget, options_string, attrs); } + else + { + if(attrs.value && widget && widget.get_value() !== attrs.value) + { + egw.window.setTimeout(jQuery.proxy(function() { + // Avoid errors if widget is destroyed before the timeout + if(this.widget && typeof this.widget.id !== 'undefined') + { + this.widget.set_value(this.widget.options.value); + } + },{widget: widget}),1); + } + } } return cache; }