diff --git a/etemplate/js/et2_widget_date.js b/etemplate/js/et2_widget_date.js index 841ca37df4..111e4a6f15 100644 --- a/etemplate/js/et2_widget_date.js +++ b/etemplate/js/et2_widget_date.js @@ -79,6 +79,7 @@ var et2_date = et2_inputWidget.extend({ }, set_value: function(_value) { + var old_value = this.value; if(_value == null || _value == 0) { this.value = _value; @@ -87,6 +88,10 @@ var et2_date = et2_inputWidget.extend({ { this.input_date.val(""); } + if(old_value !== this.value) + { + this.onchange(this.input_date); + } return; } @@ -95,6 +100,10 @@ var et2_date = et2_inputWidget.extend({ if(_value.indexOf(":") > 0 && this.type == "date-timeonly") { this.value = _value; this.input_date.timepicker('setTime',_value); + if(old_value !== this.value) + { + this.onchange(this.input_date); + } return; } else { var text = new Date(_value); @@ -133,6 +142,10 @@ var et2_date = et2_inputWidget.extend({ timezone: this.date.getTimezoneOffset() })); } + if(old_value != this.getValue()) + { + this.change(this.input_date); + } }, getValue: function() {