jQuery('.timepicker').timepicker({ format: 'LT', o" /> jQuery('.timepicker').timepicker({ format: 'LT', o" /> jQuery('.timepicker').timepicker({ format: 'LT', o"/>

Disable minutes in bootstrap time picker

234 views Asked by At

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.

1

There are 1 answers

0
Siddharth Bhansali On

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.