JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://www.thimbleopensource.com/download/jquery/jquery.filter_input.js"></script>
<form>
    <p>what is the deal</p>
        <input type="text" id="test1"/>
    <p>what is going on here?</p>
        <input type="text" id="test2"/>
</form>

JavaScript

$(document).ready(function(){
    $('#test1, #test2').blur(function(){
        var validTime = $(this).val().match(/^(0?[1-9]|1[012])(:[0-5]\d) [APap][mM]$/);
        if (!validTime) {
            $(this).val('').focus().css('background', '#fdd');
        } else {
            $(this).css('background', 'transparent');
        }
    });
});