$("#fromDate").dateRangePicker().bind('datepicker-change', function (event, obj) {
window.clearTimeout($(this).data("timeout"));
$(this).data("timeout", setTimeout(function () {
// Do your thing here
$("#postName").val('');
searchAll();
}, 800));
});
As always, a "working" use case helps greatly in understanding the problem and try to figure out what can be improved, for example using: https://jsfiddle.net
At one point the following code is called:
Later I have a button to clear:
The clear will not fire.
If I remove the bind, the clear works perfectly. Any help would be hugely appreciated.
EDIT: To be more complete let me send you the setup of the daterangepicker (may have to do something with always open)