小编Jag*_*ggi的帖子

如何使bootstrap-datetimepicker以15分钟为间隔显示时间

这是我的Javascript代码,在间隔1中以分钟为单位递增

fillMinutes = function () {
            var table = widget.find('.timepicker-minutes table'),
                currentMinute = viewDate.clone().startOf('h'),
                html = [],
                row = $('<tr>'),
                step = options.stepping === 1 ? 5 : options.stepping;

            while (viewDate.isSame(currentMinute, 'h')) {
                if (currentMinute.minute() % (step * 4) === 0) {
                    row = $('<tr>');
                    html.push(row);
                }
                row.append('<td data-action="selectMinute" class="minute' + (!isValid(currentMinute, 'm') ? ' disabled' : '') + '">' + currentMinute.format('mm') + '</td>');
                currentMinute.add(step, 'm');
            }
            table.empty().append(html);
        }
Run Code Online (Sandbox Code Playgroud)

我想修改此值以每隔15分钟递增一次。有人可以帮我吗

javascript asp.net-mvc jquery bootstrap-modal

1
推荐指数
1
解决办法
5427
查看次数

标签 统计

asp.net-mvc ×1

bootstrap-modal ×1

javascript ×1

jquery ×1