Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods: {
- forceUpper: function(e, o, prop) {
- const start = e.target.selectionStart;
- e.target.value = e.target.value.toUpperCase();
- this.$set(o, prop, e.target.value);
- e.target.setSelectionRange(start, start);
- },
- }
- ////////////////////////////////////////////////////////
- <input
- id="curp"
- name="curp"
- v-model="employee.curp"
- @input="forceUpper($event, employee, 'curp')">
Add Comment
Please, Sign In to add comment