I was wondering if there is a way to trigger blur on a select2 v3.5.2. I know v4.0 is out, however I am not at a position where I can perform an upgrade to the latest version.
On another SO thread, I discovered a (undocumented possibly) way of gaining focus on select2:
$(mySelect).select2('focus');
So I am wondering if there is a way of doing:
$(mySelect).select2('blur');
You could do it using :
setTimeout(function() {
$('.select2-container-active').removeClass('select2-container-active');
$(':focus').blur();
}, 1);
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With