Check that the user is entering a time format? eg 13:00
<p>Basically, I'd like to have an input that when blur'd, will check the input to make sure it's in the format...</p>

<p>[24hour] : [minutes]</p>

<p>So for example 13:00, or 15:30.</p>

<p>So I guess I have to split it up into three parts, check the first bit is between 0 and 24, then check it has the semi-colon, then check it has a number between 0 and 60.</p>

<p>Going more complicated than that, it'd be fantastic to have it so if the user enters 19 it'll complete it as 19:00 for example.</p>

<p>I am using jQuery fwiw, but regular code is fine, for example I'm using this little piece of code so far which works fine, to convert . inputs to :</p>

<pre><code>tempval = $(this).val().replace(".", ":");
$(this).val(tempval);
</code></pre>

<p>Not sure where to start with this, if anyone could recommend me some reading that'd be fantastic, thank you!</p>
