assets/js/romo/datepicker.js in romo-0.19.5 vs assets/js/romo/datepicker.js in romo-0.19.6
- old
+ new
@@ -176,10 +176,14 @@
var newValue = this.calTable.find('TD.romo-datepicker-highlight').data('romo-datepicker-value');
this.romoDropdown.doPopupClose();
this.doSetDate(newValue);
this.elem.focus();
- this.elem.trigger('datepicker:itemSelected', [newValue, this.prevValue, this]);
+ this.elem.trigger('datepicker:itemSelected', [newValue, this]);
+ if (newValue !== this.prevValue) {
+ this.elem.trigger('datepicker:newItemSelected', [newValue, this]);
+ }
+ // always publish the item selected events before publishing any change events
this._triggerSetDateChangeEvent();
}
RomoDatepicker.prototype.onTriggerSetDate = function(e, value) {
this.doSetDate(value);