javascript - How to make specific validation for an input using jquery? -


i'm trying validate input time 00:00 pm or am. have done 00:00 mask() validation, i'm unable extend validation 00:00 or pm.

i tried below code validation.

$("#phone").mask("00:00"); 

but want give permission user put value in (00:00 or pm) format. appreciate if help. thank

use selector inputmask validate input

$("#phone").inputmask({      mask: "h:s t\\m",      placeholder: "hh:mm xm",      alias: "datetime",      hourformat: "12"  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <script src="https://rawgit.com/robinherbots/inputmask/3.x/dist/jquery.inputmask.bundle.js"></script>    <input type="text" id="phone"/>


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -