Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions public/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ function mudarCampoInputTextarea(campo) {
});
}
}
function aplicarMascaraData() {
$('.date-mask').each(function () {
$(this).on('input', function () {
var valor = $(this).val().replace(/\D/g, '').slice(0, 8);
if (valor.length > 4) {
valor = valor.replace(/(\d{2})(\d{2})(\d{1,4})/, '$1/$2/$3');
} else if (valor.length > 2) {
valor = valor.replace(/(\d{2})(\d{1,2})/, '$1/$2');
}
$(this).val(valor);
});
});
}

/* @autor uspdev/alecosta 10/04/2026
* Habilita o campo de limite de caracteres apenas quando tipo é texto
Expand Down
Loading