I am trying to get Cleave working to convert some fields to uppercase, but unfortunately I can not get it to work.
Please see one of the examples at https://jsfiddle.net/nosir/kbaxx64s/ . For instance, I have changed the last call to:
// custom
var cleaveCustom = new Cleave('.input-custom', {
uppercase: true
});
I would expect that after running the fiddle, any values typed in the .input-custom element will be converted to uppercase. But, they are not. Am I doing something wrong or is this a bug?
Well, you will need to pass a mask block pattern as well, like [3, 3, ...] otherwise cleave.js would ignore it, that's where the lib's name comes from: cleave some stuff.
To make it work as you expected, you can pass [0, 9999] to it.
var cleaveCustom = new Cleave('.input-custom', {
uppercase: true,
blocks: [0, 9999]
});
Will close this for now.
I also expected uppercase to work with no blocks.
Most helpful comment
I also expected uppercase to work with no blocks.