Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save imeanitworks/e11cbd3d65eb6f7942746902decabf8f to your computer and use it in GitHub Desktop.
Save imeanitworks/e11cbd3d65eb6f7942746902decabf8f to your computer and use it in GitHub Desktop.
Vue Disable Autocomplete Directive
///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