jquery-timepicker icon indicating copy to clipboard operation
jquery-timepicker copied to clipboard

enable force round time when variable step

Open masak1yu opened this issue 7 years ago • 0 comments

When forceRoundTime is false in the setting.

  $(function() {
    $('#timepicker').timepicker({
      'timeFormat': 'H:i:s',
      'step': function(i) {
        // enable choice 59min
        if (i % 5 == 4) {
          return 14;
        } else if (i % 5 == 0) {
          return 1;
        } else if (i % 5 >= 1 && i % 5 <= 3) {
          return 15;
        }
      },
    });
    $('#timepicker').timepicker('setTime', new Date());

Then the time setting pull-down becomes the setting from the beginning.

It solved it by modifying the setting of _findRow.

masak1yu avatar Jul 03 '18 04:07 masak1yu