updates
This commit is contained in:
@@ -49,7 +49,7 @@ export class Cancelable {
|
|||||||
that.iconHandler.classList.add('hide');
|
that.iconHandler.classList.add('hide');
|
||||||
|
|
||||||
that.target.dxTrigger('clear');
|
that.target.dxTrigger('clear');
|
||||||
Ut.trigger(events.clear, that);
|
Ut.trigger(events.onClear, that);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export class DatePicker {
|
|||||||
|
|
||||||
if (this.isToggled && this.opts.cancelable) {
|
if (this.isToggled && this.opts.cancelable) {
|
||||||
new Cancelable(this.target, {
|
new Cancelable(this.target, {
|
||||||
clear: () => that.clear()
|
onClear: _ => that.clear()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -241,16 +241,12 @@ export class TwoDatePicker {
|
|||||||
|
|
||||||
if (this.opts.cancelable) {
|
if (this.opts.cancelable) {
|
||||||
|
|
||||||
this.target.dxOn('clear', function(e) {
|
this.target.dxOn('clear', _ => {
|
||||||
|
|
||||||
that.clear();
|
that.clear();
|
||||||
|
|
||||||
Ut.trigger(that.events.onChange, that, null, false);
|
Ut.trigger(that.events.onChange, that, null, false);
|
||||||
|
|
||||||
that.target.dxTrigger('changed');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click outside - Handler
|
// Click outside - Handler
|
||||||
|
|
||||||
document.body.dxOn('click.two_datepicker' + this.ekey, _ => this.hide());
|
document.body.dxOn('click.two_datepicker' + this.ekey, _ => this.hide());
|
||||||
|
|||||||
Reference in New Issue
Block a user