title: RegEx in Kendo UI - TimePicker
body: <p>could some one tell me how to add RegEx validation/ pattern for timepicker for KendoUI.</p>
  
  <p><a href="https://jsfiddle.net/Les7ccwk/3/" rel="nofollow noreferrer">fiddle here</a></p>
  
  <p>I've tried  <strong><code>(1[012]|[1-9]):[0-5][0-9](\\s)?(?i)(am|pm)</code></strong> pattern assigned directly in input field. doesn't work as expected.</p>
  
  <p>what i need is, the timepicker should never allow user to enter alphabetic character except AM or PM and  special characters except <strong>:</strong> colan</p>
  
  <p>but in that fiddle it will user enter alphabetic.also it get cleared when choose time from time picker.</p>
  
  <p>if my explanation is not understandable, kindly see my fiddle.
  still working on it with Jquery as well. but failed. </p>
  
  <p>tried below code but make AM/PM disappear</p>
  
  <pre><code>function replaceBadInputs(val){
                val = val.replace(/[^\dh:]/, "");
                val = val.replace(/^[^0-2]/, "");
                val = val.replace(/^([2-9])[4-9]/, "$1");
                val = val.replace(/^\d[:h]/, "");
                val = val.replace(/^([01][0-9])[^:h]/, "$1");
                val = val.replace(/^(2[0-3])[^:h]/, "$1");      
                val = val.replace(/^(\d{2}[:h])[^0-5]/, "$1");
                val = val.replace(/^(\d{2}h)./, "$1");      
                val = val.replace(/^(\d{2}:[0-5])[^0-9]/, "$1");
                val = val.replace(/^(\d{2}:\d[0-9])./, "$1");
                return val;
          }
          // Apply input rules as the user types or pastes input
              $('.houronly').keyup(function(){
                var val = this.value;
                var lastLength;
                do {
                  // Loop over the input to apply rules repeately to pasted inputs
                  lastLength = val.length;
                  val = replaceBadInputs(val);
                } while(val.length &gt; 0 &amp;&amp; lastLength !== val.length);
                this.value = val;
              });
  
              // Check the final result when the input has lost focus
              $('.houronly').blur(function(){
                var val = this.value;
                val = (/^(([PM][AM][01][0-9]|2[0-3])h)|(([01][0-9]|2[0-3]):[0-5][0-9])$/.test(val) ? val : "");
                this.value = val;
              });
  </code></pre>
  
  <p>hope someone help me and ll help others too in future</p>
  
  <p>thanks in advance </p>