Hello I am using this function code below to automatic add a colon(:) after I entered two numbers in a textbox
function limit(){
if (document.getElementById('FitaCorrectionIn1').value.length == 2) {
document.getElementById('FitaCorrectionIn1').value += ":";
return false;
}
return false
}
And here for the max length of 5
<input id="ID" type="text" style="width: 100px" onkeydown="limit()"
maxlength="5" />
And for my problem # 1 is after the textbox filled with time for example 10:00
I can manage to erase the 00
using the backspace
and my problem is I want to erase also the added colon using the backspace
is there any way to solve this?.
For the problem # 2 is for example I want enter a time of 1:00
but the output is 1::00
I need to have a condition for this or any way to solve?.