How to adjust width in Nogray timepicker input?

<html>

<head>
  <script type="text/javascript" src="js/ng_all.js"></script>
  <script type="text/javascript" src="js/ng_ui.js"></script>
  <script type="text/javascript" src="js/components/timepicker.js"></script>
  <script type="text/javascript">
    ng.ready(function() {
      var my_timepicker = new ng.TimePicker({
        input: 'my_timepicker'
      });
    });
  </script>
  <style>
    #my_timepicker {
      margin: 0px;
      padding: 0px;
    }
  </style>
</head>

<body>
  Time : <br><input id="my_timepicker" name="my_timepicker_input" style="width:10px" type="text" autocomplete="off" required><br><br>
</body>

</html>

This is my html to use Nogray time picker. I can’t adjust the width of input. And i have tried to understand source code but it is too difficult for me. Can anyone say another way of doing it?

Answer

Instead of identifying element by id, i have used class attribute to set the width in css. Hence its working well!.

Leave a Reply

Your email address will not be published. Required fields are marked *