I am being frustrated by a regular expression to mask the input field. I want to Limit input to hh:mm AM|PM format and I can\'t get this regex to work.
I use this
the follwing function return (true/false) value
function CheckTime(HtmlInputElement) { var dt = HtmlInputElement.value; return (/(0?[1-9]|1[0-2]):[0-5][0-9] ?[APap][mM]$/.test(dt)); }