JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<label>Time:-FROM</label><input type="text" pattern="([01]?[0-9]|2[0-3]):[0-5][0-9]" name="timefrom">
<input type="submit"/>
</form>
<form>
<label>Time:-FROM</label><input type="text" pattern="([01]?[0-9]|2[0-3]):[0-5][0-9]" name="timefrom">
<input type="submit"/>
</form>