如何在时钟选择器中添加分钟?

时间:2016-10-14 06:10:07

标签: javascript jquery clockpicker

我见过这个CLOCK PICKER示例,我注意到会议记录的间隔时间是5分钟。我想每个间隔1分钟,所以我可以选择我想要的。所以例如10:32就是这样。但我该怎么编辑呢?或者它已经建成5分钟间隔?。

HTML

<div class="container">
<input id="input-a" value="" data-default="20:48">
<button type="button" id="button-a">Check the  minutes</button>
<button type="button" id="button-b">Check the  hours</button>
</div>

JS

 var input = $('#input-a');
   input.clockpicker({
    autoclose: true
   });

  // Manual operations
   $('#button-a').click(function(e){
    // Have to stop propagation here
    e.stopPropagation();
    input.clockpicker('show')
            .clockpicker('toggleView', 'minutes');
   });
  $('#button-b').click(function(e){
    // Have to stop propagation here
    e.stopPropagation();
    input.clockpicker('show')
            .clockpicker('toggleView', 'hours');
   });

CSS

    body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
}
.container {
    padding: 20px;
}

0 个答案:

没有答案