diff --git a/api/js/etemplate/et2_widget_date.js b/api/js/etemplate/et2_widget_date.js index 8c1ca092c5..79cf8d2bd3 100644 --- a/api/js/etemplate/et2_widget_date.js +++ b/api/js/etemplate/et2_widget_date.js @@ -1269,12 +1269,20 @@ var et2_date_range = /** @class */ (function (_super) { this.from = et2_core_widget_1.et2_createWidget('date', { id: this.id + '[from]', blur: egw.lang('From'), - onchange: function () { widget.to.set_min(widget.from.getValue()); } + onchange: function (_node, _widget) { + widget.to.set_min(widget.from.getValue()); + if (_node instanceof jQuery) + widget.onchange.call(widget, _widget, widget); + } }, this); this.to = et2_core_widget_1.et2_createWidget('date', { id: this.id + '[to]', blur: egw.lang('To'), - onchange: function () { widget.from.set_max(widget.to.getValue()); } + onchange: function (_node, _widget) { + widget.from.set_max(widget.to.getValue()); + if (_node instanceof jQuery) + widget.onchange.call(widget, _widget, widget); + } }, this); this.select = et2_core_widget_1.et2_createWidget('select', { id: this.id + '[relative]', diff --git a/api/js/etemplate/et2_widget_date.ts b/api/js/etemplate/et2_widget_date.ts index 9834734a90..8f701c625a 100644 --- a/api/js/etemplate/et2_widget_date.ts +++ b/api/js/etemplate/et2_widget_date.ts @@ -1506,12 +1506,18 @@ export class et2_date_range extends et2_inputWidget this.from = et2_createWidget('date',{ id: this.id+'[from]', blur: egw.lang('From'), - onchange() { widget.to.set_min(widget.from.getValue()); } + onchange(_node,_widget) { + widget.to.set_min(widget.from.getValue()); + if (_node instanceof jQuery) widget.onchange.call(widget, _widget, widget); + } },this); this.to = et2_createWidget('date',{ id: this.id+'[to]', blur: egw.lang('To'), - onchange() {widget.from.set_max(widget.to.getValue()); } + onchange(_node,_widget) { + widget.from.set_max(widget.to.getValue()); + if (_node instanceof jQuery) widget.onchange.call(widget, _widget,widget); + } },this); this.select = et2_createWidget('select',{ id: this.id+'[relative]',