JS
jQuery UI

Timepicker With AM PM Example Code With Demo Using JQuery Timepicker Plugin

If you need to use am pm timepicker then you can choose jQuery Timepicker Plugin for getting timepicker. It's pretty simple to use as you can see bellow example.

  • 4.5/5.0
  • Last updated 08 September, 2022
  • By Admin

You can also you can set several options for timepicker, you can read more from here : timepicker.co

So you have to just copy bellow code and run in your local system and check.....

Example:
<html lang="en">
<head>
    <title>Jquery - Timepicker Example using jQuery Timepicker Plugin - codewale.com</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.3/jquery.timepicker.min.css">
    <script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.3/jquery.timepicker.min.js"></script>
</head>
<body>
<div class="container text-center">
     <h2>Jquery - Timepicker Example using jQuery Timepicker Plugin</h2>
     <strong>Select Time:</strong> <input type="text" id="timepicker" class="from-control">
</div>
<script type="text/javascript">
    $( "#timepicker" ).timepicker();
</script>
</body>
</html>

I hope it can help you...