I have an angular form like:
<mat-form-field>
<input
matInput
placeholder="Name">
</mat-form-field>
I need to capitalize each word in input. I used following code:
input.value = current.replace(/\b(\w)/g, symbol => symbol.toLocaleUpperCase());
but it doesn't capitalize characters like "ľščťžýáíé..." how can I solve this?
After inserting "abcděf čdef" it returns "AbcděF čDef" (just an example)