mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:28:53 +01:00
Fix onchange event not working for date-range widget
This commit is contained in:
parent
17d4c2a869
commit
dddd0a2ee0
@ -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]',
|
||||
|
@ -1506,12 +1506,18 @@ export class et2_date_range extends et2_inputWidget
|
||||
this.from = <et2_date>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_date>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_selectbox><unknown>et2_createWidget('select',{
|
||||
id: this.id+'[relative]',
|
||||
|
Loading…
Reference in New Issue
Block a user