0

I'm using bootstrap time picker

enter image description here

This is working, its script is like

  <script type="text/javascript">
     jQuery('.timepicker').timepicker({
          format: 'LT',
          orientation: 'top',
          defaultTime: '',
      });
  </script>

i want to disable minutes so that users can only change hours.

user3653474
  • 3,393
  • 6
  • 49
  • 135
  • You could *probably* just hide the time component using css. If you could create a snippet and add the relevant script tags to create a time picker, it should be evident how this could be done. – freedomn-m Nov 18 '21 at 10:30

1 Answers1

0

Instead of disabling the minutes, set the interval to 60 so the loop goes like 10:00AM -> 11:00AM and doesn't affect the minutes. timeFormat could be hh:mmp or HH:mm depending on your 12-hour or 24-hour requirement.

Siddharth Bhansali
  • 2,017
  • 2
  • 10
  • 19