How do I create a date mask on the 3D unity platform, so that when I type it, it automatically places the "/" characters?
Example: 00/00/0000
How do I create a date mask on the 3D unity platform, so that when I type it, it automatically places the "/" characters?
Example: 00/00/0000
Evandro does not know how you call a function using unity3D, but the function below does what you need.
function mdata(v) {
v = v.replace(/\D/g, ""); //Remove tudo o que não é dígito
v = v.replace(/(\d{2})(\d)/, "$1/$2");
v = v.replace(/(\d{2})(\d)/, "$1/$2");
v = v.replace(/(\d{2})(\d{2})$/, "$1$2");
return v;
}