Sha256: 4698cfe1c27b02bdaf11ad1e5af63b23bc7167089e8e4b2bb48c3fd611ce6eae
Contents?: true
Size: 859 Bytes
Versions: 15
Compression:
Stored size: 859 Bytes
Contents
function somenteNumeros(event) { return !(event.charCode >= 32 && (event.charCode < 48 || event.charCode > 57)); } function mascaraData(elemento, event) { /* 8 = backspace; 9 = tab */ if (event.keyCode == 8 || event.keyCode == 9) return true; if (elemento.value.length >= 10) return false; if (elemento.value.length == 2) { elemento.value += '/' ; return true; } else if (elemento.value.length == 5) { elemento.value += '/'; return true; } return somenteNumeros(event); } function mascaraHora(elemento, event) { /* 8 = backspace; 9 = tab */ if (event.keyCode == 8 || event.keyCode == 9) return true; if (elemento.value.length >= 5) return false; if (elemento.value.length == 2) { elemento.value += ':' ; return true; } return somenteNumeros(event); }
Version data entries
15 entries across 15 versions & 1 rubygems