title: How to restrict user input of 24 format time into input field?
body: <p>I have an input field with time in HH:MM. And I need to manage that users can only enter correct time, to prevent them from entering wrong time.</p>
  
  <p>A time in 24-Hour Format Regular Expression Pattern is</p>
  
  <pre><code>([01]?[0-9]|2[0-3]):[0-5][0-9]
  </code></pre>
  
  <p>And I've found mask input plugin <a href="https://github.com/RobinHerbots/jquery.inputmask" rel="noreferrer">https://github.com/RobinHerbots/jquery.inputmask</a></p>
  
  <p>But I dont know how to do what I want.
  Thx a lot.</p>