JavaScript below has hh:mm
mask. I need a mask in hh:mm:ss
format.
Does anyone know of a solution, or can you help me adapt the code below?
function formatHora(campo, e)
{
if (!e)
return false;
car = (window.Event) ? e.which : e.keyCode;
if (car == 8)
return true;
if((((car >=48)&&(car <=57))||(car == 8)) && (campo.value.length < 7))
{
if (campo.value.length == 2)
campo.value = campo.value + ':';
// campo.value = campo.value + ':';
return true;
}
return false;
}
Thanks for the help.