Created
March 28, 2019 23:31
-
-
Save imeanitworks/e11cbd3d65eb6f7942746902decabf8f to your computer and use it in GitHub Desktop.
Vue Disable Autocomplete Directive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///this is here because some of the input elements in element IO had the auto complete enabled by default. I wrote this to be used | |
///for element date picker and disable the auto complete option. | |
export default { | |
bind: function(el, binding, vnode) { | |
var inputs = el.getElementsByTagName("input"); | |
for (var i = 0; i < inputs.length; i++) { | |
var inputElement = inputs[i].setAttribute("autocomplete", "off"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment