Closed M-Shalabi closed 2 years ago
I'm not a programmer and I think there are better ways but this is how I done it
$(document).mouseup(function(e){ var widget = $(".bootstrap-datetimepicker-widget"); var dateinput = $(".hijri-date-input"); if (!widget.is(e.target) && widget.has(e.target).length === 0 && !dateinput.is(e.target) && dateinput.has(e.target).length === 0){ $('[data-action="close"]').trigger('click'); } });
can we have auto close option
autoclose:true
so when losing focus or clicking outside the window it closes