Before return true, add the following code
Take one more argument to this function to refer current object i.e. textbox
function nummins(evt,this) {
var vlr;
var vlr = (window.event) ? event.keyCode : evt.which;
if ((vlr >= 48 && vlr <= 57) || vlr == 8) {
var num=Number(this.value);
if(num>12)
{
return false;
}
else
{
return true;
}
}
else {
alert("Time should be a Numeric Value");
return false;
}
}
it might be useful,